Differences From Artifact [951edda6ef]:
- File src/encodings/iso_8859_15.m — part of check-in [6bf2b02dc4] at 2017-02-12 20:05:03 on branch trunk — More efficient UTF-8 -> ISO-8859-15 conversion (user: js, size: 3083) [annotate] [blame] [check-ins using]
To Artifact [2bf412aaa5]:
- File
src/encodings/iso_8859_15.m
— part of check-in
[405d11522e]
at
2017-02-12 23:56:13
on branch trunk
— encodings: Make the page tables unsigned char[]
This also removes page.*Size, as the macros can just use sizeof() on the
arrays. (user: js, size: 2909) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
33 34 35 36 37 38 39 | 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF, 0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7, 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF }; const size_t of_iso_8859_15_table_offset = 256 - (sizeof(of_iso_8859_15_table) / sizeof(*of_iso_8859_15_table)); | | < | < | < | 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 | 0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF, 0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7, 0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF }; const size_t of_iso_8859_15_table_offset = 256 - (sizeof(of_iso_8859_15_table) / sizeof(*of_iso_8859_15_table)); static const unsigned char page0[] = { 0x00, 0xA5, 0x00, 0xA7, 0x00, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, 0x00, 0xB5, 0xB6, 0xB7, 0x00, 0xB9, 0xBA, 0xBB, 0x00, 0x00, 0x00 }; static const uint8_t page0Start = 0xA4; static const unsigned char page1[] = { 0xBC, 0xBD, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA6, 0xA8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBE, 0x00, 0x00, 0x00, 0x00, 0xB4, 0xB8 }; static const uint8_t page1Start = 0x52; static const unsigned char page20[] = { 0xA4 }; static const uint8_t page20Start = 0xAC; bool of_unicode_to_iso_8859_15(const of_unichar_t *input, unsigned char *output, size_t length, bool lossy) { for (size_t i = 0; i < length; i++) { of_unichar_t c = input[i]; |
︙ | ︙ |