Overview
Comment: | Use U+FFFF for invalid characters
This used to be U+FFFD, but if a character is not assigned in an |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
a9f85ba3b1012db9f6a5cb837ec11998 |
User & Date: | js on 2017-01-11 03:49:27 |
Other Links: | manifest | tags |
Context
2017-01-11
| ||
04:22 | Add Windows-1251 encoding check-in: 0f88ccfb04 user: js tags: trunk | |
03:49 | Use U+FFFF for invalid characters check-in: a9f85ba3b1 user: js tags: trunk | |
03:38 | OFHTTPClient: Make sure the path is never nil check-in: fa2b1e6f68 user: js tags: trunk | |
Changes
Modified src/OFString_UTF8.m from [293372453e] to [38f6296657].
︙ | ︙ | |||
316 317 318 319 320 321 322 | if (!(cString[i] & 0x80)) { _s->cString[j++] = cString[i]; continue; } character = table[(uint8_t)cString[i] - 128]; | | | 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 | if (!(cString[i] & 0x80)) { _s->cString[j++] = cString[i]; continue; } character = table[(uint8_t)cString[i] - 128]; if (character == 0xFFFF) @throw [OFInvalidEncodingException exception]; _s->isUTF8 = true; characterBytes = of_string_utf8_encode(character, buffer); if (characterBytes == 0) |
︙ | ︙ |
Modified src/windows_1252.m from [836478cdf6] to [4e7a49cc4a].
︙ | ︙ | |||
15 16 17 18 19 20 21 | */ #include "config.h" #import "OFString.h" const of_char16_t of_windows_1252[128] = { | | | | | | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | */ #include "config.h" #import "OFString.h" const of_char16_t of_windows_1252[128] = { 0x20AC, 0xFFFF, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, 0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0xFFFF, 0x017D, 0xFFFF, 0xFFFF, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, 0xFFFF, 0x017E, 0x0178, 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7, 0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF, 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7, 0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF, 0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7, 0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF, 0x00D0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7, |
︙ | ︙ |