@@ -37,18 +37,18 @@ static OFLocale *currentLocale = nil; static OFDictionary *operatorPrecedences = nil; #ifndef OF_AMIGAOS static void -parseLocale(char *locale, of_string_encoding_t *encoding, +parseLocale(char *locale, OFStringEncoding *encoding, OFString **language, OFString **territory) { if ((locale = of_strdup(locale)) == NULL) return; @try { - const of_string_encoding_t enc = OF_STRING_ENCODING_ASCII; + OFStringEncoding enc = OFStringEncodingASCII; char *tmp; /* We don't care for extras behind the @ */ if ((tmp = strrchr(locale, '@')) != NULL) *tmp = '\0'; @@ -57,11 +57,11 @@ if ((tmp = strrchr(locale, '.')) != NULL) { *tmp++ = '\0'; @try { if (encoding != NULL) - *encoding = of_string_parse_encoding( + *encoding = OFParseStringEncodingName( [OFString stringWithCString: tmp encoding: enc]); } @catch (OFInvalidArgumentException *e) { } } @@ -349,11 +349,11 @@ + (OFString *)territory { return currentLocale.territory; } -+ (of_string_encoding_t)encoding ++ (OFStringEncoding)encoding { return currentLocale.encoding; } + (OFString *)decimalPoint @@ -378,11 +378,11 @@ if (currentLocale != nil) @throw [OFInitializationFailedException exceptionWithClass: self.class]; - _encoding = OF_STRING_ENCODING_UTF_8; + _encoding = OFStringEncodingUTF8; _decimalPoint = @"."; _localizedStrings = [[OFMutableArray alloc] init]; if ((locale = setlocale(LC_ALL, "")) != NULL) _decimalPoint = [[OFString alloc] @@ -422,21 +422,21 @@ # elif defined(OF_AMIGAOS4) if (GetVar("Charset", buffer, sizeof(buffer), 0) > 0) { # else if (0) { # endif - of_string_encoding_t ASCII = OF_STRING_ENCODING_ASCII; + OFStringEncoding ASCII = OFStringEncodingASCII; @try { - _encoding = of_string_parse_encoding( + _encoding = OFStringEncodingForName( [OFString stringWithCString: buffer encoding: ASCII]); } @catch (OFInvalidArgumentException *e) { - _encoding = OF_STRING_ENCODING_ISO_8859_1; + _encoding = OFStringEncodingISO8859_1; } } else - _encoding = OF_STRING_ENCODING_ISO_8859_1; + _encoding = OFStringEncodingISO8859_1; /* * Get it via localeconv() instead of from the Locale struct, * to make sure we and printf etc. have the same expectations. */