@@ -37,12 +37,12 @@ #import "autorelease.h" #import "macros.h" #import "of_asprintf.h" #import "unicode.h" -extern const of_char16_t of_iso_8859_15[256]; -extern const of_char16_t of_windows_1252[256]; +extern const of_char16_t of_iso_8859_15[128]; +extern const of_char16_t of_windows_1252[128]; static inline int memcasecmp(const char *first, const char *second, size_t length) { size_t i; @@ -300,11 +300,11 @@ if (!(cString[i] & 0x80)) { _s->cString[j++] = cString[i]; continue; } - character = table[(uint8_t)cString[i]]; + character = table[(uint8_t)cString[i] - 128]; if (character == 0xFFFD) @throw [OFInvalidEncodingException exception]; _s->isUTF8 = true;