@@ -177,18 +177,20 @@ @try { const char *cString; size_t i; itemSize = 1; - count = [string UTF8StringLength]; + count = [string + lengthOfBytesUsingEncoding: OF_STRING_ENCODING_ASCII]; if (count & 1) @throw [OFInvalidFormatException exceptionWithClass: [self class]]; count >>= 1; - cString = [string UTF8String]; + cString = [string + cStringUsingEncoding: OF_STRING_ENCODING_ASCII]; items = [self allocMemoryWithSize: count]; for (i = 0; i < count; i++) { uint8_t c1 = cString[2 * i]; uint8_t c2 = cString[2 * i + 1]; @@ -229,13 +231,13 @@ self = [super init]; @try { itemSize = 1; - if (!of_base64_decode(self, [string cStringWithEncoding: + if (!of_base64_decode(self, [string cStringUsingEncoding: OF_STRING_ENCODING_ASCII], [string - cStringLengthWithEncoding: OF_STRING_ENCODING_ASCII])) { + lengthOfBytesUsingEncoding: OF_STRING_ENCODING_ASCII])) { Class c = [self class]; [self release]; @throw [OFInvalidFormatException exceptionWithClass: c]; } } @catch (id e) { @@ -262,13 +264,13 @@ exceptionWithClass: [self class] selector: _cmd]; stringValue = [element stringValue]; - if (!of_base64_decode(self, - [stringValue cStringWithEncoding: OF_STRING_ENCODING_ASCII], - [stringValue cStringLengthWithEncoding: + if (!of_base64_decode(self, [stringValue + cStringUsingEncoding: OF_STRING_ENCODING_ASCII], + [stringValue lengthOfBytesUsingEncoding: OF_STRING_ENCODING_ASCII])) @throw [OFInvalidFormatException exceptionWithClass: [self class]]; objc_autoreleasePoolPop(pool);