Overview
Comment: | Improve of_string_utf8_to_unicode. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
3d007c839338fafc351f5f4948217dce |
User & Date: | js on 2009-11-10 15:34:39 |
Other Links: | manifest | tags |
Context
2009-11-10
| ||
20:13 | Fix a typo in TableGenerator.m and the resulting unicode.h. check-in: c628317621 user: js tags: trunk | |
15:34 | Improve of_string_utf8_to_unicode. check-in: 3d007c8393 user: js tags: trunk | |
15:32 | Improve -[compare:]. check-in: 6772512e3e user: js tags: trunk | |
Changes
Modified src/OFMutableString.m from [be87eedb20] to [ae31141f77].
︙ | |||
33 34 35 36 37 38 39 | 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | - + + - - + + - + | static void apply_table(id self, Class isa, char **string, unsigned int *length, BOOL is_utf8, const of_unichar_t* const table[], const size_t table_size) { of_unichar_t c, tc; of_unichar_t *ustr; |
︙ | |||
85 86 87 88 89 90 91 | 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | - - - - - + - - - - - - | else if (tc < 0x110000) nlen += 4; else { [self freeMemory: ustr]; @throw [OFInvalidEncodingException newWithClass: isa]; } |
︙ |
Modified src/OFString.h from [1b35f65444] to [a8cd4bc958].
︙ | |||
11 12 13 14 15 16 17 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | - - - + | #include <stdio.h> #include <stdarg.h> #import "OFObject.h" #import "OFArray.h" |
︙ |
Modified src/OFString.m from [c3f91002a4] to [b097e022e5].
︙ | |||
136 137 138 139 140 141 142 | 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 | - - + + - - + + + + - + - + + - + - + + - + - + + - + | buf[i] = 0x80 | (c & 0x3F); return 4; } return 0; } |
︙ | |||
611 612 613 614 615 616 617 | 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 | - + - | of_unichar_t c; index = of_string_index_to_position(string, index, length); if (index >= length) @throw [OFOutOfRangeException newWithClass: isa]; |
︙ |