Index: src/OFMessagePackExtension.m ================================================================== --- src/OFMessagePackExtension.m +++ src/OFMessagePackExtension.m @@ -74,11 +74,11 @@ } - (OFDataArray*)messagePackRepresentation { OFDataArray *ret; - int8_t prefix; + uint8_t prefix; size_t count = [_data count]; if (count == 1) { ret = [OFDataArray dataArrayWithCapacity: 3]; Index: src/OFString.m ================================================================== --- src/OFString.m +++ src/OFString.m @@ -76,14 +76,15 @@ lossy: (bool)lossy; - (OFString*)OF_JSONRepresentationWithOptions: (int)options depth: (size_t)depth; @end -extern bool of_unicode_to_iso_8859_15(const of_unichar_t*, char*, size_t, bool); -extern bool of_unicode_to_windows_1252(const of_unichar_t*, char*, size_t, +extern bool of_unicode_to_iso_8859_15(const of_unichar_t*, uint8_t*, size_t, + bool); +extern bool of_unicode_to_windows_1252(const of_unichar_t*, uint8_t*, size_t, bool); -extern bool of_unicode_to_codepage_437(const of_unichar_t*, char*, size_t, +extern bool of_unicode_to_codepage_437(const of_unichar_t*, uint8_t*, size_t, bool); /* References for static linking */ void _references_to_categories_of_OFString(void) { @@ -1067,34 +1068,34 @@ return length; case OF_STRING_ENCODING_ISO_8859_15: if (length + 1 > maxLength) @throw [OFOutOfRangeException exception]; - if (!of_unicode_to_iso_8859_15(characters, cString, length, - lossy)) + if (!of_unicode_to_iso_8859_15(characters, (uint8_t*)cString, + length, lossy)) @throw [OFInvalidEncodingException exception]; cString[length] = '\0'; return length; case OF_STRING_ENCODING_WINDOWS_1252: if (length + 1 > maxLength) @throw [OFOutOfRangeException exception]; - if (!of_unicode_to_windows_1252(characters, cString, length, - lossy)) + if (!of_unicode_to_windows_1252(characters, (uint8_t*)cString, + length, lossy)) @throw [OFInvalidEncodingException exception]; cString[length] = '\0'; return length; case OF_STRING_ENCODING_CODEPAGE_437: if (length + 1 > maxLength) @throw [OFOutOfRangeException exception]; - if (!of_unicode_to_codepage_437(characters, cString, length, - lossy)) + if (!of_unicode_to_codepage_437(characters, (uint8_t*)cString, + length, lossy)) @throw [OFInvalidEncodingException exception]; cString[length] = '\0'; return length; Index: src/codepage_437.m ================================================================== --- src/codepage_437.m +++ src/codepage_437.m @@ -36,11 +36,11 @@ 0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248, 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0 }; bool -of_unicode_to_codepage_437(const of_unichar_t *input, char *output, +of_unicode_to_codepage_437(const of_unichar_t *input, uint8_t *output, size_t length, bool lossy) { size_t i; for (i = 0; i < length; i++) { Index: src/iso_8859_15.m ================================================================== --- src/iso_8859_15.m +++ src/iso_8859_15.m @@ -36,11 +36,11 @@ 0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7, 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF }; bool -of_unicode_to_iso_8859_15(const of_unichar_t *input, char *output, +of_unicode_to_iso_8859_15(const of_unichar_t *input, uint8_t *output, size_t length, bool lossy) { size_t i; for (i = 0; i < length; i++) { Index: src/windows_1252.m ================================================================== --- src/windows_1252.m +++ src/windows_1252.m @@ -36,11 +36,11 @@ 0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7, 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF }; bool -of_unicode_to_windows_1252(const of_unichar_t *input, char *output, +of_unicode_to_windows_1252(const of_unichar_t *input, uint8_t *output, size_t length, bool lossy) { size_t i; for (i = 0; i < length; i++) {