@@ -1113,10 +1113,11 @@ } cString[i] = '\0'; return length; +#ifdef HAVE_ISO_8859_2 case OF_STRING_ENCODING_ISO_8859_2: if (length + 1 > maxLength) @throw [OFOutOfRangeException exception]; if (!of_unicode_to_iso_8859_2(characters, @@ -1124,10 +1125,12 @@ @throw [OFInvalidEncodingException exception]; cString[length] = '\0'; return length; +#endif +#ifdef HAVE_ISO_8859_15 case OF_STRING_ENCODING_ISO_8859_15: if (length + 1 > maxLength) @throw [OFOutOfRangeException exception]; if (!of_unicode_to_iso_8859_15(characters, @@ -1135,10 +1138,12 @@ @throw [OFInvalidEncodingException exception]; cString[length] = '\0'; return length; +#endif +#ifdef HAVE_WINDOWS_1251 case OF_STRING_ENCODING_WINDOWS_1251: if (length + 1 > maxLength) @throw [OFOutOfRangeException exception]; if (!of_unicode_to_windows_1251(characters, @@ -1146,10 +1151,12 @@ @throw [OFInvalidEncodingException exception]; cString[length] = '\0'; return length; +#endif +#ifdef HAVE_WINDOWS_1252 case OF_STRING_ENCODING_WINDOWS_1252: if (length + 1 > maxLength) @throw [OFOutOfRangeException exception]; if (!of_unicode_to_windows_1252(characters, @@ -1157,10 +1164,12 @@ @throw [OFInvalidEncodingException exception]; cString[length] = '\0'; return length; +#endif +#ifdef HAVE_CODEPAGE_437 case OF_STRING_ENCODING_CODEPAGE_437: if (length + 1 > maxLength) @throw [OFOutOfRangeException exception]; if (!of_unicode_to_codepage_437(characters, @@ -1168,10 +1177,12 @@ @throw [OFInvalidEncodingException exception]; cString[length] = '\0'; return length; +#endif +#ifdef HAVE_CODEPAGE_850 case OF_STRING_ENCODING_CODEPAGE_850: if (length + 1 > maxLength) @throw [OFOutOfRangeException exception]; if (!of_unicode_to_codepage_850(characters, @@ -1179,10 +1190,12 @@ @throw [OFInvalidEncodingException exception]; cString[length] = '\0'; return length; +#endif +#ifdef HAVE_CODEPAGE_858 case OF_STRING_ENCODING_CODEPAGE_858: if (length + 1 > maxLength) @throw [OFOutOfRangeException exception]; if (!of_unicode_to_codepage_858(characters, @@ -1190,10 +1203,12 @@ @throw [OFInvalidEncodingException exception]; cString[length] = '\0'; return length; +#endif +#ifdef HAVE_MAC_ROMAN case OF_STRING_ENCODING_MAC_ROMAN: if (length + 1 > maxLength) @throw [OFOutOfRangeException exception]; if (!of_unicode_to_mac_roman(characters, @@ -1201,10 +1216,11 @@ @throw [OFInvalidEncodingException exception]; cString[length] = '\0'; return length; +#endif default: @throw [OFNotImplementedException exceptionWithSelector: _cmd object: self]; } }