help :(
Dependencies: FFT
FATFileSystem/ChaN/ccsbcs.cpp@0:d6c9b09b4042, 2020-12-02 (annotated)
- Committer:
- annieluo2
- Date:
- Wed Dec 02 18:02:03 2020 +0000
- Revision:
- 0:d6c9b09b4042
boo
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
annieluo2 | 0:d6c9b09b4042 | 1 | /*------------------------------------------------------------------------*/ |
annieluo2 | 0:d6c9b09b4042 | 2 | /* Unicode - Local code bidirectional converter (C)ChaN, 2015 */ |
annieluo2 | 0:d6c9b09b4042 | 3 | /* (SBCS code pages) */ |
annieluo2 | 0:d6c9b09b4042 | 4 | /*------------------------------------------------------------------------*/ |
annieluo2 | 0:d6c9b09b4042 | 5 | /* 437 U.S. |
annieluo2 | 0:d6c9b09b4042 | 6 | / 720 Arabic |
annieluo2 | 0:d6c9b09b4042 | 7 | / 737 Greek |
annieluo2 | 0:d6c9b09b4042 | 8 | / 771 KBL |
annieluo2 | 0:d6c9b09b4042 | 9 | / 775 Baltic |
annieluo2 | 0:d6c9b09b4042 | 10 | / 850 Latin 1 |
annieluo2 | 0:d6c9b09b4042 | 11 | / 852 Latin 2 |
annieluo2 | 0:d6c9b09b4042 | 12 | / 855 Cyrillic |
annieluo2 | 0:d6c9b09b4042 | 13 | / 857 Turkish |
annieluo2 | 0:d6c9b09b4042 | 14 | / 860 Portuguese |
annieluo2 | 0:d6c9b09b4042 | 15 | / 861 Icelandic |
annieluo2 | 0:d6c9b09b4042 | 16 | / 862 Hebrew |
annieluo2 | 0:d6c9b09b4042 | 17 | / 863 Canadian French |
annieluo2 | 0:d6c9b09b4042 | 18 | / 864 Arabic |
annieluo2 | 0:d6c9b09b4042 | 19 | / 865 Nordic |
annieluo2 | 0:d6c9b09b4042 | 20 | / 866 Russian |
annieluo2 | 0:d6c9b09b4042 | 21 | / 869 Greek 2 |
annieluo2 | 0:d6c9b09b4042 | 22 | */ |
annieluo2 | 0:d6c9b09b4042 | 23 | |
annieluo2 | 0:d6c9b09b4042 | 24 | #include "ff.h" |
annieluo2 | 0:d6c9b09b4042 | 25 | |
annieluo2 | 0:d6c9b09b4042 | 26 | |
annieluo2 | 0:d6c9b09b4042 | 27 | #if _CODE_PAGE == 437 |
annieluo2 | 0:d6c9b09b4042 | 28 | #define _TBLDEF 1 |
annieluo2 | 0:d6c9b09b4042 | 29 | static |
annieluo2 | 0:d6c9b09b4042 | 30 | const WCHAR Tbl[] = { /* CP437(0x80-0xFF) to Unicode conversion table */ |
annieluo2 | 0:d6c9b09b4042 | 31 | 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7, 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x00EC, 0x00C4, 0x00C5, |
annieluo2 | 0:d6c9b09b4042 | 32 | 0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00F2, 0x00FB, 0x00F9, 0x00FF, 0x00D6, 0x00DC, 0x00A2, 0x00A3, 0x00A5, 0x20A7, 0x0192, |
annieluo2 | 0:d6c9b09b4042 | 33 | 0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x00AA, 0x00BA, 0x00BF, 0x2310, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB, |
annieluo2 | 0:d6c9b09b4042 | 34 | 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510, |
annieluo2 | 0:d6c9b09b4042 | 35 | 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F, 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567, |
annieluo2 | 0:d6c9b09b4042 | 36 | 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B, 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580, |
annieluo2 | 0:d6c9b09b4042 | 37 | 0x03B1, 0x00DF, 0x0393, 0x03C0, 0x03A3, 0x03C3, 0x00B5, 0x03C4, 0x03A6, 0x0398, 0x03A9, 0x03B4, 0x221E, 0x03C6, 0x03B5, 0x2229, |
annieluo2 | 0:d6c9b09b4042 | 38 | 0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248, 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0 |
annieluo2 | 0:d6c9b09b4042 | 39 | }; |
annieluo2 | 0:d6c9b09b4042 | 40 | |
annieluo2 | 0:d6c9b09b4042 | 41 | #elif _CODE_PAGE == 720 |
annieluo2 | 0:d6c9b09b4042 | 42 | #define _TBLDEF 1 |
annieluo2 | 0:d6c9b09b4042 | 43 | static |
annieluo2 | 0:d6c9b09b4042 | 44 | const WCHAR Tbl[] = { /* CP720(0x80-0xFF) to Unicode conversion table */ |
annieluo2 | 0:d6c9b09b4042 | 45 | 0x0000, 0x0000, 0x00E9, 0x00E2, 0x0000, 0x00E0, 0x0000, 0x00E7, 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x0000, 0x0000, 0x0000, |
annieluo2 | 0:d6c9b09b4042 | 46 | 0x0000, 0x0651, 0x0652, 0x00F4, 0x00A4, 0x0640, 0x00FB, 0x00F9, 0x0621, 0x0622, 0x0623, 0x0624, 0x00A3, 0x0625, 0x0626, 0x0627, |
annieluo2 | 0:d6c9b09b4042 | 47 | 0x0628, 0x0629, 0x062A, 0x062B, 0x062C, 0x062D, 0x062E, 0x062F, 0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x00AB, 0x00BB, |
annieluo2 | 0:d6c9b09b4042 | 48 | 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510, |
annieluo2 | 0:d6c9b09b4042 | 49 | 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F, 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567, |
annieluo2 | 0:d6c9b09b4042 | 50 | 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B, 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580, |
annieluo2 | 0:d6c9b09b4042 | 51 | 0x0636, 0x0637, 0x0638, 0x0639, 0x063A, 0x0641, 0x00B5, 0x0642, 0x0643, 0x0644, 0x0645, 0x0646, 0x0647, 0x0648, 0x0649, 0x064A, |
annieluo2 | 0:d6c9b09b4042 | 52 | 0x2261, 0x064B, 0x064C, 0x064D, 0x064E, 0x064F, 0x0650, 0x2248, 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0 |
annieluo2 | 0:d6c9b09b4042 | 53 | }; |
annieluo2 | 0:d6c9b09b4042 | 54 | |
annieluo2 | 0:d6c9b09b4042 | 55 | #elif _CODE_PAGE == 737 |
annieluo2 | 0:d6c9b09b4042 | 56 | #define _TBLDEF 1 |
annieluo2 | 0:d6c9b09b4042 | 57 | static |
annieluo2 | 0:d6c9b09b4042 | 58 | const WCHAR Tbl[] = { /* CP737(0x80-0xFF) to Unicode conversion table */ |
annieluo2 | 0:d6c9b09b4042 | 59 | 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398, 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F, 0x03A0, |
annieluo2 | 0:d6c9b09b4042 | 60 | 0x03A1, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7, 0x03A8, 0x03A9, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7, 0x03B8, |
annieluo2 | 0:d6c9b09b4042 | 61 | 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF, 0x03C0, 0x03C1, 0x03C3, 0x03C2, 0x03C4, 0x03C5, 0x03C6, 0x03C7, 0x03C8, |
annieluo2 | 0:d6c9b09b4042 | 62 | 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510, |
annieluo2 | 0:d6c9b09b4042 | 63 | 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F, 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567, |
annieluo2 | 0:d6c9b09b4042 | 64 | 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B, 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580, |
annieluo2 | 0:d6c9b09b4042 | 65 | 0x03C9, 0x03AC, 0x03AD, 0x03AE, 0x03CA, 0x03AF, 0x03CC, 0x03CD, 0x03CB, 0x03CE, 0x0386, 0x0388, 0x0389, 0x038A, 0x038C, 0x038E, |
annieluo2 | 0:d6c9b09b4042 | 66 | 0x038F, 0x00B1, 0x2265, 0x2264, 0x03AA, 0x03AB, 0x00F7, 0x2248, 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0 |
annieluo2 | 0:d6c9b09b4042 | 67 | }; |
annieluo2 | 0:d6c9b09b4042 | 68 | |
annieluo2 | 0:d6c9b09b4042 | 69 | #elif _CODE_PAGE == 771 |
annieluo2 | 0:d6c9b09b4042 | 70 | #define _TBLDEF 1 |
annieluo2 | 0:d6c9b09b4042 | 71 | static |
annieluo2 | 0:d6c9b09b4042 | 72 | const WCHAR Tbl[] = { /* CP771(0x80-0xFF) to Unicode conversion table */ |
annieluo2 | 0:d6c9b09b4042 | 73 | 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F, |
annieluo2 | 0:d6c9b09b4042 | 74 | 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F, |
annieluo2 | 0:d6c9b09b4042 | 75 | 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F, |
annieluo2 | 0:d6c9b09b4042 | 76 | 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x2558, 0x2510, |
annieluo2 | 0:d6c9b09b4042 | 77 | 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F, 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567, |
annieluo2 | 0:d6c9b09b4042 | 78 | 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B, 0x256A, 0x2518, 0x250C, 0x2588, 0x0104, 0x0105, 0x010C, 0x010D, |
annieluo2 | 0:d6c9b09b4042 | 79 | 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F, |
annieluo2 | 0:d6c9b09b4042 | 80 | 0x0118, 0x0119, 0x0116, 0x0117, 0x012E, 0x012F, 0x0160, 0x0161, 0x0172, 0x0173, 0x016A, 0x016B, 0x017D, 0x017E, 0x25A0, 0x00A0 |
annieluo2 | 0:d6c9b09b4042 | 81 | }; |
annieluo2 | 0:d6c9b09b4042 | 82 | |
annieluo2 | 0:d6c9b09b4042 | 83 | #elif _CODE_PAGE == 775 |
annieluo2 | 0:d6c9b09b4042 | 84 | #define _TBLDEF 1 |
annieluo2 | 0:d6c9b09b4042 | 85 | static |
annieluo2 | 0:d6c9b09b4042 | 86 | const WCHAR Tbl[] = { /* CP775(0x80-0xFF) to Unicode conversion table */ |
annieluo2 | 0:d6c9b09b4042 | 87 | 0x0106, 0x00FC, 0x00E9, 0x0101, 0x00E4, 0x0123, 0x00E5, 0x0107, 0x0142, 0x0113, 0x0156, 0x0157, 0x012B, 0x0179, 0x00C4, 0x00C5, |
annieluo2 | 0:d6c9b09b4042 | 88 | 0x00C9, 0x00E6, 0x00C6, 0x014D, 0x00F6, 0x0122, 0x00A2, 0x015A, 0x015B, 0x00D6, 0x00DC, 0x00F8, 0x00A3, 0x00D8, 0x00D7, 0x00A4, |
annieluo2 | 0:d6c9b09b4042 | 89 | 0x0100, 0x012A, 0x00F3, 0x017B, 0x017C, 0x017A, 0x201D, 0x00A6, 0x00A9, 0x00AE, 0x00AC, 0x00BD, 0x00BC, 0x0141, 0x00AB, 0x00BB, |
annieluo2 | 0:d6c9b09b4042 | 90 | 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x0104, 0x010C, 0x0118, 0x0116, 0x2563, 0x2551, 0x2557, 0x255D, 0x012E, 0x0160, 0x2510, |
annieluo2 | 0:d6c9b09b4042 | 91 | 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x0172, 0x016A, 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x017D, |
annieluo2 | 0:d6c9b09b4042 | 92 | 0x0105, 0x010D, 0x0119, 0x0117, 0x012F, 0x0161, 0x0173, 0x016B, 0x017E, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580, |
annieluo2 | 0:d6c9b09b4042 | 93 | 0x00D3, 0x00DF, 0x014C, 0x0143, 0x00F5, 0x00D5, 0x00B5, 0x0144, 0x0136, 0x0137, 0x013B, 0x013C, 0x0146, 0x0112, 0x0145, 0x2019, |
annieluo2 | 0:d6c9b09b4042 | 94 | 0x00AD, 0x00B1, 0x201C, 0x00BE, 0x00B6, 0x00A7, 0x00F7, 0x201E, 0x00B0, 0x2219, 0x00B7, 0x00B9, 0x00B3, 0x00B2, 0x25A0, 0x00A0 |
annieluo2 | 0:d6c9b09b4042 | 95 | }; |
annieluo2 | 0:d6c9b09b4042 | 96 | |
annieluo2 | 0:d6c9b09b4042 | 97 | #elif _CODE_PAGE == 850 |
annieluo2 | 0:d6c9b09b4042 | 98 | #define _TBLDEF 1 |
annieluo2 | 0:d6c9b09b4042 | 99 | static |
annieluo2 | 0:d6c9b09b4042 | 100 | const WCHAR Tbl[] = { /* CP850(0x80-0xFF) to Unicode conversion table */ |
annieluo2 | 0:d6c9b09b4042 | 101 | 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7, 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x00EC, 0x00C4, 0x00C5, |
annieluo2 | 0:d6c9b09b4042 | 102 | 0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00F2, 0x00FB, 0x00F9, 0x00FF, 0x00D6, 0x00DC, 0x00F8, 0x00A3, 0x00D8, 0x00D7, 0x0192, |
annieluo2 | 0:d6c9b09b4042 | 103 | 0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x00AA, 0x00BA, 0x00BF, 0x00AE, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB, |
annieluo2 | 0:d6c9b09b4042 | 104 | 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x00C1, 0x00C2, 0x00C0, 0x00A9, 0x2563, 0x2551, 0x2557, 0x255D, 0x00A2, 0x00A5, 0x2510, |
annieluo2 | 0:d6c9b09b4042 | 105 | 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x00E3, 0x00C3, 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x00A4, |
annieluo2 | 0:d6c9b09b4042 | 106 | 0x00F0, 0x00D0, 0x00CA, 0x00CB, 0x00C8, 0x0131, 0x00CD, 0x00CE, 0x00CF, 0x2518, 0x250C, 0x2588, 0x2584, 0x00A6, 0x00CC, 0x2580, |
annieluo2 | 0:d6c9b09b4042 | 107 | 0x00D3, 0x00DF, 0x00D4, 0x00D2, 0x00F5, 0x00D5, 0x00B5, 0x00FE, 0x00DE, 0x00DA, 0x00DB, 0x00D9, 0x00FD, 0x00DD, 0x00AF, 0x00B4, |
annieluo2 | 0:d6c9b09b4042 | 108 | 0x00AD, 0x00B1, 0x2017, 0x00BE, 0x00B6, 0x00A7, 0x00F7, 0x00B8, 0x00B0, 0x00A8, 0x00B7, 0x00B9, 0x00B3, 0x00B2, 0x25A0, 0x00A0 |
annieluo2 | 0:d6c9b09b4042 | 109 | }; |
annieluo2 | 0:d6c9b09b4042 | 110 | |
annieluo2 | 0:d6c9b09b4042 | 111 | #elif _CODE_PAGE == 852 |
annieluo2 | 0:d6c9b09b4042 | 112 | #define _TBLDEF 1 |
annieluo2 | 0:d6c9b09b4042 | 113 | static |
annieluo2 | 0:d6c9b09b4042 | 114 | const WCHAR Tbl[] = { /* CP852(0x80-0xFF) to Unicode conversion table */ |
annieluo2 | 0:d6c9b09b4042 | 115 | 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x016F, 0x0107, 0x00E7, 0x0142, 0x00EB, 0x0150, 0x0151, 0x00EE, 0x0179, 0x00C4, 0x0106, |
annieluo2 | 0:d6c9b09b4042 | 116 | 0x00C9, 0x0139, 0x013A, 0x00F4, 0x00F6, 0x013D, 0x013E, 0x015A, 0x015B, 0x00D6, 0x00DC, 0x0164, 0x0165, 0x0141, 0x00D7, 0x010D, |
annieluo2 | 0:d6c9b09b4042 | 117 | 0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x0104, 0x0105, 0x017D, 0x017E, 0x0118, 0x0119, 0x00AC, 0x017A, 0x010C, 0x015F, 0x00AB, 0x00BB, |
annieluo2 | 0:d6c9b09b4042 | 118 | 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x00C1, 0x00C2, 0x011A, 0x015E, 0x2563, 0x2551, 0x2557, 0x255D, 0x017B, 0x017C, 0x2510, |
annieluo2 | 0:d6c9b09b4042 | 119 | 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x0102, 0x0103, 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x00A4, |
annieluo2 | 0:d6c9b09b4042 | 120 | 0x0111, 0x0110, 0x010E, 0x00CB, 0x010F, 0x0147, 0x00CD, 0x00CE, 0x011B, 0x2518, 0x250C, 0x2588, 0x2584, 0x0162, 0x016E, 0x2580, |
annieluo2 | 0:d6c9b09b4042 | 121 | 0x00D3, 0x00DF, 0x00D4, 0x0143, 0x0144, 0x0148, 0x0160, 0x0161, 0x0154, 0x00DA, 0x0155, 0x0170, 0x00FD, 0x00DD, 0x0163, 0x00B4, |
annieluo2 | 0:d6c9b09b4042 | 122 | 0x00AD, 0x02DD, 0x02DB, 0x02C7, 0x02D8, 0x00A7, 0x00F7, 0x00B8, 0x00B0, 0x00A8, 0x02D9, 0x0171, 0x0158, 0x0159, 0x25A0, 0x00A0 |
annieluo2 | 0:d6c9b09b4042 | 123 | }; |
annieluo2 | 0:d6c9b09b4042 | 124 | |
annieluo2 | 0:d6c9b09b4042 | 125 | #elif _CODE_PAGE == 855 |
annieluo2 | 0:d6c9b09b4042 | 126 | #define _TBLDEF 1 |
annieluo2 | 0:d6c9b09b4042 | 127 | static |
annieluo2 | 0:d6c9b09b4042 | 128 | const WCHAR Tbl[] = { /* CP855(0x80-0xFF) to Unicode conversion table */ |
annieluo2 | 0:d6c9b09b4042 | 129 | 0x0452, 0x0402, 0x0453, 0x0403, 0x0451, 0x0401, 0x0454, 0x0404, 0x0455, 0x0405, 0x0456, 0x0406, 0x0457, 0x0407, 0x0458, 0x0408, |
annieluo2 | 0:d6c9b09b4042 | 130 | 0x0459, 0x0409, 0x045A, 0x040A, 0x045B, 0x040B, 0x045C, 0x040C, 0x045E, 0x040E, 0x045F, 0x040F, 0x044E, 0x042E, 0x044A, 0x042A, |
annieluo2 | 0:d6c9b09b4042 | 131 | 0x0430, 0x0410, 0x0431, 0x0411, 0x0446, 0x0426, 0x0434, 0x0414, 0x0435, 0x0415, 0x0444, 0x0424, 0x0433, 0x0413, 0x00AB, 0x00BB, |
annieluo2 | 0:d6c9b09b4042 | 132 | 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x0445, 0x0425, 0x0438, 0x0418, 0x2563, 0x2551, 0x2557, 0x255D, 0x0439, 0x0419, 0x2510, |
annieluo2 | 0:d6c9b09b4042 | 133 | 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x043A, 0x041A, 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x00A4, |
annieluo2 | 0:d6c9b09b4042 | 134 | 0x043B, 0x041B, 0x043C, 0x041C, 0x043D, 0x041D, 0x043E, 0x041E, 0x043F, 0x2518, 0x250C, 0x2588, 0x2584, 0x041F, 0x044F, 0x2580, |
annieluo2 | 0:d6c9b09b4042 | 135 | 0x042F, 0x0440, 0x0420, 0x0441, 0x0421, 0x0442, 0x0422, 0x0443, 0x0423, 0x0436, 0x0416, 0x0432, 0x0412, 0x044C, 0x042C, 0x2116, |
annieluo2 | 0:d6c9b09b4042 | 136 | 0x00AD, 0x044B, 0x042B, 0x0437, 0x0417, 0x0448, 0x0428, 0x044D, 0x042D, 0x0449, 0x0429, 0x0447, 0x0427, 0x00A7, 0x25A0, 0x00A0 |
annieluo2 | 0:d6c9b09b4042 | 137 | }; |
annieluo2 | 0:d6c9b09b4042 | 138 | |
annieluo2 | 0:d6c9b09b4042 | 139 | #elif _CODE_PAGE == 857 |
annieluo2 | 0:d6c9b09b4042 | 140 | #define _TBLDEF 1 |
annieluo2 | 0:d6c9b09b4042 | 141 | static |
annieluo2 | 0:d6c9b09b4042 | 142 | const WCHAR Tbl[] = { /* CP857(0x80-0xFF) to Unicode conversion table */ |
annieluo2 | 0:d6c9b09b4042 | 143 | 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7, 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x0131, 0x00C4, 0x00C5, |
annieluo2 | 0:d6c9b09b4042 | 144 | 0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00F2, 0x00FB, 0x00F9, 0x0130, 0x00D6, 0x00DC, 0x00F8, 0x00A3, 0x00D8, 0x015E, 0x015F, |
annieluo2 | 0:d6c9b09b4042 | 145 | 0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x011E, 0x011F, 0x00BF, 0x00AE, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB, |
annieluo2 | 0:d6c9b09b4042 | 146 | 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x00C1, 0x00C2, 0x00C0, 0x00A9, 0x2563, 0x2551, 0x2557, 0x255D, 0x00A2, 0x00A5, 0x2510, |
annieluo2 | 0:d6c9b09b4042 | 147 | 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x00E3, 0x00C3, 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x00A4, |
annieluo2 | 0:d6c9b09b4042 | 148 | 0x00BA, 0x00AA, 0x00CA, 0x00CB, 0x00C8, 0x0000, 0x00CD, 0x00CE, 0x00CF, 0x2518, 0x250C, 0x2588, 0x2584, 0x00A6, 0x00CC, 0x2580, |
annieluo2 | 0:d6c9b09b4042 | 149 | 0x00D3, 0x00DF, 0x00D4, 0x00D2, 0x00F5, 0x00D5, 0x00B5, 0x0000, 0x00D7, 0x00DA, 0x00DB, 0x00D9, 0x00EC, 0x00FF, 0x00AF, 0x00B4, |
annieluo2 | 0:d6c9b09b4042 | 150 | 0x00AD, 0x00B1, 0x0000, 0x00BE, 0x00B6, 0x00A7, 0x00F7, 0x00B8, 0x00B0, 0x00A8, 0x00B7, 0x00B9, 0x00B3, 0x00B2, 0x25A0, 0x00A0 |
annieluo2 | 0:d6c9b09b4042 | 151 | }; |
annieluo2 | 0:d6c9b09b4042 | 152 | |
annieluo2 | 0:d6c9b09b4042 | 153 | #elif _CODE_PAGE == 860 |
annieluo2 | 0:d6c9b09b4042 | 154 | #define _TBLDEF 1 |
annieluo2 | 0:d6c9b09b4042 | 155 | static |
annieluo2 | 0:d6c9b09b4042 | 156 | const WCHAR Tbl[] = { /* CP860(0x80-0xFF) to Unicode conversion table */ |
annieluo2 | 0:d6c9b09b4042 | 157 | 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E3, 0x00E0, 0x00C1, 0x00E7, 0x00EA, 0x00CA, 0x00E8, 0x00CD, 0x00D4, 0x00EC, 0x00C3, 0x00C2, |
annieluo2 | 0:d6c9b09b4042 | 158 | 0x00C9, 0x00C0, 0x00C8, 0x00F4, 0x00F5, 0x00F2, 0x00DA, 0x00F9, 0x00CC, 0x00D5, 0x00DC, 0x00A2, 0x00A3, 0x00D9, 0x20A7, 0x00D3, |
annieluo2 | 0:d6c9b09b4042 | 159 | 0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x00AA, 0x00BA, 0x00BF, 0x00D2, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB, |
annieluo2 | 0:d6c9b09b4042 | 160 | 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x2558, 0x2510, |
annieluo2 | 0:d6c9b09b4042 | 161 | 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F, 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567, |
annieluo2 | 0:d6c9b09b4042 | 162 | 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B, 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580, |
annieluo2 | 0:d6c9b09b4042 | 163 | 0x03B1, 0x00DF, 0x0393, 0x03C0, 0x03A3, 0x03C3, 0x00B5, 0x03C4, 0x03A6, 0x0398, 0x03A9, 0x03B4, 0x221E, 0x03C6, 0x03B5, 0x2229, |
annieluo2 | 0:d6c9b09b4042 | 164 | 0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248, 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0 |
annieluo2 | 0:d6c9b09b4042 | 165 | }; |
annieluo2 | 0:d6c9b09b4042 | 166 | |
annieluo2 | 0:d6c9b09b4042 | 167 | #elif _CODE_PAGE == 861 |
annieluo2 | 0:d6c9b09b4042 | 168 | #define _TBLDEF 1 |
annieluo2 | 0:d6c9b09b4042 | 169 | static |
annieluo2 | 0:d6c9b09b4042 | 170 | const WCHAR Tbl[] = { /* CP861(0x80-0xFF) to Unicode conversion table */ |
annieluo2 | 0:d6c9b09b4042 | 171 | 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E6, 0x00E7, 0x00EA, 0x00EB, 0x00E8, 0x00D0, 0x00F0, 0x00DE, 0x00C4, 0x00C5, |
annieluo2 | 0:d6c9b09b4042 | 172 | 0x00C9, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00FE, 0x00FB, 0x00DD, 0x00FD, 0x00D6, 0x00DC, 0x00F8, 0x00A3, 0x00D8, 0x20A7, 0x0192, |
annieluo2 | 0:d6c9b09b4042 | 173 | 0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00C1, 0x00CD, 0x00D3, 0x00DA, 0x00BF, 0x2310, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB, |
annieluo2 | 0:d6c9b09b4042 | 174 | 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510, |
annieluo2 | 0:d6c9b09b4042 | 175 | 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F, 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567, |
annieluo2 | 0:d6c9b09b4042 | 176 | 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B, 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580, |
annieluo2 | 0:d6c9b09b4042 | 177 | 0x03B1, 0x00DF, 0x0393, 0x03C0, 0x03A3, 0x03C3, 0x00B5, 0x03C4, 0x03A6, 0x0398, 0x03A9, 0x03B4, 0x221E, 0x03C6, 0x03B5, 0x2229, |
annieluo2 | 0:d6c9b09b4042 | 178 | 0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248, 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0 |
annieluo2 | 0:d6c9b09b4042 | 179 | }; |
annieluo2 | 0:d6c9b09b4042 | 180 | |
annieluo2 | 0:d6c9b09b4042 | 181 | #elif _CODE_PAGE == 862 |
annieluo2 | 0:d6c9b09b4042 | 182 | #define _TBLDEF 1 |
annieluo2 | 0:d6c9b09b4042 | 183 | static |
annieluo2 | 0:d6c9b09b4042 | 184 | const WCHAR Tbl[] = { /* CP862(0x80-0xFF) to Unicode conversion table */ |
annieluo2 | 0:d6c9b09b4042 | 185 | 0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7, 0x05D8, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF, |
annieluo2 | 0:d6c9b09b4042 | 186 | 0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7, 0x05E8, 0x05E9, 0x05EA, 0x00A2, 0x00A3, 0x00A5, 0x20A7, 0x0192, |
annieluo2 | 0:d6c9b09b4042 | 187 | 0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x00AA, 0x00BA, 0x00BF, 0x2310, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00BB, |
annieluo2 | 0:d6c9b09b4042 | 188 | 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510, |
annieluo2 | 0:d6c9b09b4042 | 189 | 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F, 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567, |
annieluo2 | 0:d6c9b09b4042 | 190 | 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B, 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580, |
annieluo2 | 0:d6c9b09b4042 | 191 | 0x03B1, 0x00DF, 0x0393, 0x03C0, 0x03A3, 0x03C3, 0x00B5, 0x03C4, 0x03A6, 0x0398, 0x03A9, 0x03B4, 0x221E, 0x03C6, 0x03B5, 0x2229, |
annieluo2 | 0:d6c9b09b4042 | 192 | 0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248, 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0 |
annieluo2 | 0:d6c9b09b4042 | 193 | }; |
annieluo2 | 0:d6c9b09b4042 | 194 | |
annieluo2 | 0:d6c9b09b4042 | 195 | #elif _CODE_PAGE == 863 |
annieluo2 | 0:d6c9b09b4042 | 196 | #define _TBLDEF 1 |
annieluo2 | 0:d6c9b09b4042 | 197 | static |
annieluo2 | 0:d6c9b09b4042 | 198 | const WCHAR Tbl[] = { /* CP863(0x80-0xFF) to Unicode conversion table */ |
annieluo2 | 0:d6c9b09b4042 | 199 | 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00C2, 0x00E0, 0x00B6, 0x00E7, 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x00EC, 0x2017, 0x00C0, |
annieluo2 | 0:d6c9b09b4042 | 200 | 0x00C9, 0x00C8, 0x00CA, 0x00F4, 0x00CB, 0x00CF, 0x00FB, 0x00F9, 0x00A4, 0x00D4, 0x00DC, 0x00A2, 0x00A3, 0x00D9, 0x00DB, 0x0192, |
annieluo2 | 0:d6c9b09b4042 | 201 | 0x00A6, 0x00B4, 0x00F3, 0x00FA, 0x00A8, 0x00BB, 0x00B3, 0x00AF, 0x00CE, 0x3210, 0x00AC, 0x00BD, 0x00BC, 0x00BE, 0x00AB, 0x00BB, |
annieluo2 | 0:d6c9b09b4042 | 202 | 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510, |
annieluo2 | 0:d6c9b09b4042 | 203 | 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F, 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567, |
annieluo2 | 0:d6c9b09b4042 | 204 | 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B, 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580, |
annieluo2 | 0:d6c9b09b4042 | 205 | 0x03B1, 0x00DF, 0x0393, 0x03C0, 0x03A3, 0x03C3, 0x00B5, 0x03C4, 0x03A6, 0x0398, 0x03A9, 0x03B4, 0x221E, 0x03C6, 0x03B5, 0x2219, |
annieluo2 | 0:d6c9b09b4042 | 206 | 0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248, 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0 |
annieluo2 | 0:d6c9b09b4042 | 207 | }; |
annieluo2 | 0:d6c9b09b4042 | 208 | |
annieluo2 | 0:d6c9b09b4042 | 209 | #elif _CODE_PAGE == 864 |
annieluo2 | 0:d6c9b09b4042 | 210 | #define _TBLDEF 1 |
annieluo2 | 0:d6c9b09b4042 | 211 | static |
annieluo2 | 0:d6c9b09b4042 | 212 | const WCHAR Tbl[] = { /* CP864(0x80-0xFF) to Unicode conversion table */ |
annieluo2 | 0:d6c9b09b4042 | 213 | 0x00B0, 0x00B7, 0x2219, 0x221A, 0x2592, 0x2500, 0x2502, 0x253C, 0x2524, 0x252C, 0x251C, 0x2534, 0x2510, 0x250C, 0x2514, 0x2518, |
annieluo2 | 0:d6c9b09b4042 | 214 | 0x03B2, 0x221E, 0x03C6, 0x00B1, 0x00BD, 0x00BC, 0x2248, 0x00AB, 0x00BB, 0xFEF7, 0xFEF8, 0x0000, 0x0000, 0xFEFB, 0xFEFC, 0x0000, |
annieluo2 | 0:d6c9b09b4042 | 215 | 0x00A0, 0x00AD, 0xFE82, 0x00A3, 0x00A4, 0xFE84, 0x0000, 0x20AC, 0xFE8E, 0xFE8F, 0xFE95, 0xFE99, 0x060C, 0xFE9D, 0xFEA1, 0xFEA5, |
annieluo2 | 0:d6c9b09b4042 | 216 | 0x0660, 0x0661, 0x0662, 0x0663, 0x0664, 0x0665, 0x0666, 0x0667, 0x0668, 0x0669, 0xFED1, 0x061B, 0xFEB1, 0xFEB5, 0xFEB9, 0x061F, |
annieluo2 | 0:d6c9b09b4042 | 217 | 0x00A2, 0xFE80, 0xFE81, 0xFE83, 0xFE85, 0xFECA, 0xFE8B, 0xFE8D, 0xFE91, 0xFE93, 0xFE97, 0xFE9B, 0xFE9F, 0xFEA3, 0xFEA7, 0xFEA9, |
annieluo2 | 0:d6c9b09b4042 | 218 | 0xFEAB, 0xFEAD, 0xFEAF, 0xFEB3, 0xFEB7, 0xFEBB, 0xFEBF, 0xFEC1, 0xFEC5, 0xFECB, 0xFECF, 0x00A6, 0x00AC, 0x00F7, 0x00D7, 0xFEC9, |
annieluo2 | 0:d6c9b09b4042 | 219 | 0x0640, 0xFED3, 0xFED7, 0xFEDB, 0xFEDF, 0xFEE3, 0xFEE7, 0xFEEB, 0xFEED, 0xFEEF, 0xFEF3, 0xFEBD, 0xFECC, 0xFECE, 0xFECD, 0xFEE1, |
annieluo2 | 0:d6c9b09b4042 | 220 | 0xFE7D, 0x0651, 0xFEE5, 0xFEE9, 0xFEEC, 0xFEF0, 0xFEF2, 0xFED0, 0xFED5, 0xFEF5, 0xFEF6, 0xFEDD, 0xFED9, 0xFEF1, 0x25A0, 0x0000 |
annieluo2 | 0:d6c9b09b4042 | 221 | }; |
annieluo2 | 0:d6c9b09b4042 | 222 | |
annieluo2 | 0:d6c9b09b4042 | 223 | #elif _CODE_PAGE == 865 |
annieluo2 | 0:d6c9b09b4042 | 224 | #define _TBLDEF 1 |
annieluo2 | 0:d6c9b09b4042 | 225 | static |
annieluo2 | 0:d6c9b09b4042 | 226 | const WCHAR Tbl[] = { /* CP865(0x80-0xFF) to Unicode conversion table */ |
annieluo2 | 0:d6c9b09b4042 | 227 | 0x00C7, 0x00FC, 0x00E9, 0x00E2, 0x00E4, 0x00E0, 0x00E5, 0x00E7, 0x00EA, 0x00EB, 0x00E8, 0x00EF, 0x00EE, 0x00EC, 0x00C4, 0x00C5, |
annieluo2 | 0:d6c9b09b4042 | 228 | 0x00C5, 0x00E6, 0x00C6, 0x00F4, 0x00F6, 0x00F2, 0x00FB, 0x00F9, 0x00FF, 0x00D6, 0x00DC, 0x00F8, 0x00A3, 0x00D8, 0x20A7, 0x0192, |
annieluo2 | 0:d6c9b09b4042 | 229 | 0x00E1, 0x00ED, 0x00F3, 0x00FA, 0x00F1, 0x00D1, 0x00AA, 0x00BA, 0x00BF, 0x2310, 0x00AC, 0x00BD, 0x00BC, 0x00A1, 0x00AB, 0x00A4, |
annieluo2 | 0:d6c9b09b4042 | 230 | 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x2558, 0x2510, |
annieluo2 | 0:d6c9b09b4042 | 231 | 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F, 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567, |
annieluo2 | 0:d6c9b09b4042 | 232 | 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B, 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580, |
annieluo2 | 0:d6c9b09b4042 | 233 | 0x03B1, 0x00DF, 0x0393, 0x03C0, 0x03A3, 0x03C3, 0x00B5, 0x03C4, 0x03A6, 0x0398, 0x03A9, 0x03B4, 0x221E, 0x03C6, 0x03B5, 0x2229, |
annieluo2 | 0:d6c9b09b4042 | 234 | 0x2261, 0x00B1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00F7, 0x2248, 0x00B0, 0x2219, 0x00B7, 0x221A, 0x207F, 0x00B2, 0x25A0, 0x00A0 |
annieluo2 | 0:d6c9b09b4042 | 235 | }; |
annieluo2 | 0:d6c9b09b4042 | 236 | |
annieluo2 | 0:d6c9b09b4042 | 237 | #elif _CODE_PAGE == 866 |
annieluo2 | 0:d6c9b09b4042 | 238 | #define _TBLDEF 1 |
annieluo2 | 0:d6c9b09b4042 | 239 | static |
annieluo2 | 0:d6c9b09b4042 | 240 | const WCHAR Tbl[] = { /* CP866(0x80-0xFF) to Unicode conversion table */ |
annieluo2 | 0:d6c9b09b4042 | 241 | 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F, |
annieluo2 | 0:d6c9b09b4042 | 242 | 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F, |
annieluo2 | 0:d6c9b09b4042 | 243 | 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F, |
annieluo2 | 0:d6c9b09b4042 | 244 | 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510, |
annieluo2 | 0:d6c9b09b4042 | 245 | 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F, 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567, |
annieluo2 | 0:d6c9b09b4042 | 246 | 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B, 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580, |
annieluo2 | 0:d6c9b09b4042 | 247 | 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F, |
annieluo2 | 0:d6c9b09b4042 | 248 | 0x0401, 0x0451, 0x0404, 0x0454, 0x0407, 0x0457, 0x040E, 0x045E, 0x00B0, 0x2219, 0x00B7, 0x221A, 0x2116, 0x00A4, 0x25A0, 0x00A0 |
annieluo2 | 0:d6c9b09b4042 | 249 | }; |
annieluo2 | 0:d6c9b09b4042 | 250 | |
annieluo2 | 0:d6c9b09b4042 | 251 | #elif _CODE_PAGE == 869 |
annieluo2 | 0:d6c9b09b4042 | 252 | #define _TBLDEF 1 |
annieluo2 | 0:d6c9b09b4042 | 253 | static |
annieluo2 | 0:d6c9b09b4042 | 254 | const WCHAR Tbl[] = { /* CP869(0x80-0xFF) to Unicode conversion table */ |
annieluo2 | 0:d6c9b09b4042 | 255 | 0x00B7, 0x00B7, 0x00B7, 0x00B7, 0x00B7, 0x00B7, 0x0386, 0x00B7, 0x00B7, 0x00AC, 0x00A6, 0x2018, 0x2019, 0x0388, 0x2015, 0x0389, |
annieluo2 | 0:d6c9b09b4042 | 256 | 0x038A, 0x03AA, 0x038C, 0x00B7, 0x00B7, 0x038E, 0x03AB, 0x00A9, 0x038F, 0x00B2, 0x00B3, 0x03AC, 0x00A3, 0x03AD, 0x03AE, 0x03AF, |
annieluo2 | 0:d6c9b09b4042 | 257 | 0x03CA, 0x0390, 0x03CC, 0x03CD, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x00BD, 0x0398, 0x0399, 0x00AB, 0x00BB, |
annieluo2 | 0:d6c9b09b4042 | 258 | 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x039A, 0x039B, 0x039C, 0x039D, 0x2563, 0x2551, 0x2557, 0x255D, 0x039E, 0x039F, 0x2510, |
annieluo2 | 0:d6c9b09b4042 | 259 | 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x0A30, 0x03A1, 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x03A3, |
annieluo2 | 0:d6c9b09b4042 | 260 | 0x03A4, 0x03A5, 0x03A6, 0x03A7, 0x03A8, 0x03A9, 0x03B1, 0x03B2, 0x03B3, 0x2518, 0x250C, 0x2588, 0x2584, 0x03B4, 0x03B5, 0x2580, |
annieluo2 | 0:d6c9b09b4042 | 261 | 0x03B6, 0x03B7, 0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF, 0x03C0, 0x03C1, 0x03C3, 0x03C2, 0x03C4, 0x0384, |
annieluo2 | 0:d6c9b09b4042 | 262 | 0x00AD, 0x00B1, 0x03C5, 0x03C6, 0x03C7, 0x00A7, 0x03C8, 0x0385, 0x00B0, 0x00A8, 0x03C9, 0x03CB, 0x03B0, 0x03CE, 0x25A0, 0x00A0 |
annieluo2 | 0:d6c9b09b4042 | 263 | }; |
annieluo2 | 0:d6c9b09b4042 | 264 | |
annieluo2 | 0:d6c9b09b4042 | 265 | #endif |
annieluo2 | 0:d6c9b09b4042 | 266 | |
annieluo2 | 0:d6c9b09b4042 | 267 | |
annieluo2 | 0:d6c9b09b4042 | 268 | #if !_TBLDEF || !_USE_LFN |
annieluo2 | 0:d6c9b09b4042 | 269 | #error This file is not needed at current configuration. Remove from the project. |
annieluo2 | 0:d6c9b09b4042 | 270 | #endif |
annieluo2 | 0:d6c9b09b4042 | 271 | |
annieluo2 | 0:d6c9b09b4042 | 272 | |
annieluo2 | 0:d6c9b09b4042 | 273 | |
annieluo2 | 0:d6c9b09b4042 | 274 | |
annieluo2 | 0:d6c9b09b4042 | 275 | WCHAR ff_convert ( /* Converted character, Returns zero on error */ |
annieluo2 | 0:d6c9b09b4042 | 276 | WCHAR chr, /* Character code to be converted */ |
annieluo2 | 0:d6c9b09b4042 | 277 | UINT dir /* 0: Unicode to OEM code, 1: OEM code to Unicode */ |
annieluo2 | 0:d6c9b09b4042 | 278 | ) |
annieluo2 | 0:d6c9b09b4042 | 279 | { |
annieluo2 | 0:d6c9b09b4042 | 280 | WCHAR c; |
annieluo2 | 0:d6c9b09b4042 | 281 | |
annieluo2 | 0:d6c9b09b4042 | 282 | |
annieluo2 | 0:d6c9b09b4042 | 283 | if (chr < 0x80) { /* ASCII */ |
annieluo2 | 0:d6c9b09b4042 | 284 | c = chr; |
annieluo2 | 0:d6c9b09b4042 | 285 | |
annieluo2 | 0:d6c9b09b4042 | 286 | } else { |
annieluo2 | 0:d6c9b09b4042 | 287 | if (dir) { /* OEM code to Unicode */ |
annieluo2 | 0:d6c9b09b4042 | 288 | c = (chr >= 0x100) ? 0 : Tbl[chr - 0x80]; |
annieluo2 | 0:d6c9b09b4042 | 289 | |
annieluo2 | 0:d6c9b09b4042 | 290 | } else { /* Unicode to OEM code */ |
annieluo2 | 0:d6c9b09b4042 | 291 | for (c = 0; c < 0x80; c++) { |
annieluo2 | 0:d6c9b09b4042 | 292 | if (chr == Tbl[c]) break; |
annieluo2 | 0:d6c9b09b4042 | 293 | } |
annieluo2 | 0:d6c9b09b4042 | 294 | c = (c + 0x80) & 0xFF; |
annieluo2 | 0:d6c9b09b4042 | 295 | } |
annieluo2 | 0:d6c9b09b4042 | 296 | } |
annieluo2 | 0:d6c9b09b4042 | 297 | |
annieluo2 | 0:d6c9b09b4042 | 298 | return c; |
annieluo2 | 0:d6c9b09b4042 | 299 | } |
annieluo2 | 0:d6c9b09b4042 | 300 | |
annieluo2 | 0:d6c9b09b4042 | 301 | |
annieluo2 | 0:d6c9b09b4042 | 302 | |
annieluo2 | 0:d6c9b09b4042 | 303 | |
annieluo2 | 0:d6c9b09b4042 | 304 | WCHAR ff_wtoupper ( /* Returns upper converted character */ |
annieluo2 | 0:d6c9b09b4042 | 305 | WCHAR chr /* Unicode character to be upper converted */ |
annieluo2 | 0:d6c9b09b4042 | 306 | ) |
annieluo2 | 0:d6c9b09b4042 | 307 | { |
annieluo2 | 0:d6c9b09b4042 | 308 | static const WCHAR lower[] = { /* Lower case characters to be converted */ |
annieluo2 | 0:d6c9b09b4042 | 309 | /* Latin Supplement */ 0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF, |
annieluo2 | 0:d6c9b09b4042 | 310 | /* Latin Extended-A */ 0x101,0x103,0x105,0x107,0x109,0x10B,0x10D,0x10F,0x111,0x113,0x115,0x117,0x119,0x11B,0x11D,0x11F,0x121,0x123,0x125,0x127,0x129,0x12B,0x12D,0x12F,0x131,0x133,0x135,0x137,0x13A,0x13C,0x13E,0x140,0x142,0x144,0x146,0x148,0x14B,0x14D,0x14F,0x151,0x153,0x155,0x157,0x159,0x15B,0x15D,0x15F,0x161,0x163,0x165,0x167,0x169,0x16B,0x16D,0x16F,0x171,0x173,0x175,0x177,0x17A,0x17C,0x17E, |
annieluo2 | 0:d6c9b09b4042 | 311 | /* Latin Extended-B */ 0x183,0x185,0x188,0x18C,0x192,0x199,0x1A1,0x1A3,0x1A8,0x1AD,0x1B0,0x1B4,0x1B6,0x1B9,0x1BD,0x1C6,0x1C9,0x1CC,0x1CE,0x1D0,0x1D2,0x1D4,0x1D6,0x1D8,0x1DA,0x1DC,0x1DD,0x1DF,0x1E1,0x1E3,0x1E5,0x1E7,0x1E9,0x1EB,0x1ED,0x1EF,0x1F3,0x1F5,0x1FB,0x1FD,0x1FF,0x201,0x203,0x205,0x207,0x209,0x20B,0x20D,0x20F,0x211,0x213,0x215,0x217, |
annieluo2 | 0:d6c9b09b4042 | 312 | /* Greek, Coptic */ 0x3B1,0x3B2,0x3B3,0x3B4,0x3B5,0x3B6,0x3B7,0x3B8,0x3B9,0x3BA,0x3BB,0x3BC,0x3BD,0x3BE,0x3BF,0x3C0,0x3C1,0x3C3,0x3C4,0x3C5,0x3C6,0x3C7,0x3C8,0x3C9,0x3CA,0x3CB,0x3CC,0x3CD,0x3CE,0x3E3,0x3E5,0x3E7,0x3E9,0x3EB, |
annieluo2 | 0:d6c9b09b4042 | 313 | /* Cyrillic */ 0x430,0x431,0x432,0x433,0x434,0x435,0x436,0x437,0x438,0x439,0x43A,0x43B,0x43C,0x43D,0x43E,0x43F,0x440,0x441,0x442,0x443,0x444,0x445,0x446,0x447,0x448,0x449,0x44A,0x44B,0x44C,0x44D,0x44E,0x44F,0x452,0x453,0x454,0x455,0x456,0x457,0x458,0x459,0x45A,0x45B,0x45C,0x45E,0x45F,0x461,0x463,0x465,0x467,0x469,0x46B,0x46D,0x46F,0x471,0x473,0x475,0x477,0x479,0x47B,0x47D,0x47F,0x481,0x491,0x493,0x495,0x497,0x499,0x49B,0x49D,0x49F,0x4A1,0x4A3,0x4A5,0x4A7,0x4A9,0x4AB,0x4AD,0x4AF,0x4B1,0x4B3,0x4B5,0x4B7,0x4B9,0x4BB,0x4BD,0x4BF,0x4C2,0x4C4,0x4C8,0x4D1,0x4D3,0x4D5,0x4D7,0x4D9,0x4DB,0x4DD,0x4DF,0x4E1,0x4E3,0x4E5,0x4E7,0x4E9,0x4EB,0x4ED,0x4EF,0x4F1,0x4F3,0x4F5,0x4F9, |
annieluo2 | 0:d6c9b09b4042 | 314 | /* Armenian */ 0x561,0x562,0x563,0x564,0x565,0x566,0x567,0x568,0x569,0x56A,0x56B,0x56C,0x56D,0x56E,0x56F,0x570,0x571,0x572,0x573,0x574,0x575,0x576,0x577,0x578,0x579,0x57A,0x57B,0x57C,0x57D,0x57E,0x57F,0x580,0x581,0x582,0x583,0x584,0x585,0x586, |
annieluo2 | 0:d6c9b09b4042 | 315 | /* Latin Extended Additional */ 0x1E01,0x1E03,0x1E05,0x1E07,0x1E09,0x1E0B,0x1E0D,0x1E0F,0x1E11,0x1E13,0x1E15,0x1E17,0x1E19,0x1E1B,0x1E1D,0x1E1F,0x1E21,0x1E23,0x1E25,0x1E27,0x1E29,0x1E2B,0x1E2D,0x1E2F,0x1E31,0x1E33,0x1E35,0x1E37,0x1E39,0x1E3B,0x1E3D,0x1E3F,0x1E41,0x1E43,0x1E45,0x1E47,0x1E49,0x1E4B,0x1E4D,0x1E4F,0x1E51,0x1E53,0x1E55,0x1E57,0x1E59,0x1E5B,0x1E5D,0x1E5F,0x1E61,0x1E63,0x1E65,0x1E67,0x1E69,0x1E6B,0x1E6D,0x1E6F,0x1E71,0x1E73,0x1E75,0x1E77,0x1E79,0x1E7B,0x1E7D,0x1E7F,0x1E81,0x1E83,0x1E85,0x1E87,0x1E89,0x1E8B,0x1E8D,0x1E8F,0x1E91,0x1E93,0x1E95,0x1E97,0x1E99,0x1E9B,0x1E9D,0x1E9F,0x1EA1,0x1EA3,0x1EA5,0x1EA7,0x1EA9,0x1EAB,0x1EAD,0x1EAF,0x1EB1,0x1EB3,0x1EB5,0x1EB7,0x1EB9,0x1EBB,0x1EBD,0x1EBF,0x1EC1,0x1EC3,0x1EC5,0x1EC7,0x1EC9,0x1ECB,0x1ECD,0x1ECF,0x1ED1,0x1ED3,0x1ED5,0x1ED7,0x1ED9,0x1EDB,0x1EDD,0x1EDF,0x1EE1,0x1EE3,0x1EE5,0x1EE7,0x1EE9,0x1EEB,0x1EED,0x1EEF,0x1EF1,0x1EF3,0x1EF5,0x1EF7,0x1EF9, |
annieluo2 | 0:d6c9b09b4042 | 316 | /* Number forms */ 0x2170,0x2171,0x2172,0x2173,0x2174,0x2175,0x2176,0x2177,0x2178,0x2179,0x217A,0x217B,0x217C,0x217D,0x217E,0x217F, |
annieluo2 | 0:d6c9b09b4042 | 317 | /* Full-width */ 0xFF41,0xFF42,0xFF43,0xFF44,0xFF45,0xFF46,0xFF47,0xFF48,0xFF49,0xFF4A,0xFF4B,0xFF4C,0xFF4D,0xFF4E,0xFF4F,0xFF50,0xFF51,0xFF52,0xFF53,0xFF54,0xFF55,0xFF56,0xFF57,0xFF58,0xFF59,0xFF5A |
annieluo2 | 0:d6c9b09b4042 | 318 | }; |
annieluo2 | 0:d6c9b09b4042 | 319 | static const WCHAR upper[] = { /* Upper case characters correspond to lower[] */ |
annieluo2 | 0:d6c9b09b4042 | 320 | 0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0x178, |
annieluo2 | 0:d6c9b09b4042 | 321 | 0x100,0x102,0x104,0x106,0x108,0x10A,0x10C,0x10E,0x110,0x112,0x114,0x116,0x118,0x11A,0x11C,0x11E,0x120,0x122,0x124,0x126,0x128,0x12A,0x12C,0x12E,0x130,0x132,0x134,0x136,0x139,0x13B,0x13D,0x13F,0x141,0x143,0x145,0x147,0x14A,0x14C,0x14E,0x150,0x152,0x154,0x156,0x158,0x15A,0x15C,0x15E,0x160,0x162,0x164,0x166,0x168,0x16A,0x16C,0x16E,0x170,0x172,0x174,0x176,0x179,0x17B,0x17D, |
annieluo2 | 0:d6c9b09b4042 | 322 | 0x182,0x184,0x187,0x18B,0x191,0x198,0x1A0,0x1A2,0x1A7,0x1AC,0x1AF,0x1B3,0x1B5,0x1B8,0x1BC,0x1C4,0x1C7,0x1CA,0x1CD,0x1CF,0x1D1,0x1D3,0x1D5,0x1D7,0x1D9,0x1DB,0x18E,0x1DE,0x1E0,0x1E2,0x1E4,0x1E6,0x1E8,0x1EA,0x1EC,0x1EE,0x1F1,0x1F4,0x1FA,0x1FC,0x1FE,0x200,0x202,0x204,0x206,0x208,0x20A,0x20C,0x20E,0x210,0x212,0x214,0x216, |
annieluo2 | 0:d6c9b09b4042 | 323 | 0x391,0x392,0x393,0x394,0x395,0x396,0x397,0x398,0x399,0x39A,0x39B,0x39C,0x39D,0x39E,0x39F,0x3A0,0x3A1,0x3A3,0x3A4,0x3A5,0x3A6,0x3A7,0x3A8,0x3A9,0x3AA,0x3AB,0x38C,0x38E,0x38F,0x3E2,0x3E4,0x3E6,0x3E8,0x3EA, |
annieluo2 | 0:d6c9b09b4042 | 324 | 0x410,0x411,0x412,0x413,0x414,0x415,0x416,0x417,0x418,0x419,0x41A,0x41B,0x41C,0x41D,0x41E,0x41F,0x420,0x421,0x422,0x423,0x424,0x425,0x426,0x427,0x428,0x429,0x42A,0x42B,0x42C,0x42D,0x42E,0x42F,0x402,0x403,0x404,0x405,0x406,0x407,0x408,0x409,0x40A,0x40B,0x40C,0x40E,0x40F,0x460,0x462,0x464,0x466,0x468,0x46A,0x46C,0x46E,0x470,0x472,0x474,0x476,0x478,0x47A,0x47C,0x47E,0x480,0x490,0x492,0x494,0x496,0x498,0x49A,0x49C,0x49E,0x4A0,0x4A2,0x4A4,0x4A6,0x4A8,0x4AA,0x4AC,0x4AE,0x4B0,0x4B2,0x4B4,0x4B6,0x4B8,0x4BA,0x4BC,0x4BE,0x4C1,0x4C3,0x5C7,0x4D0,0x4D2,0x4D4,0x4D6,0x4D8,0x4DA,0x4DC,0x4DE,0x4E0,0x4E2,0x4E4,0x4E6,0x4E8,0x4EA,0x4EC,0x4EE,0x4F0,0x4F2,0x4F4,0x4F8, |
annieluo2 | 0:d6c9b09b4042 | 325 | 0x531,0x532,0x533,0x534,0x535,0x536,0x537,0x538,0x539,0x53A,0x53B,0x53C,0x53D,0x53E,0x53F,0x540,0x541,0x542,0x543,0x544,0x545,0x546,0x547,0x548,0x549,0x54A,0x54B,0x54C,0x54D,0x54E,0x54F,0x550,0x551,0x552,0x553,0x554,0x555,0x556, |
annieluo2 | 0:d6c9b09b4042 | 326 | 0x1E00,0x1E02,0x1E04,0x1E06,0x1E08,0x1E0A,0x1E0C,0x1E0E,0x1E10,0x1E12,0x1E14,0x1E16,0x1E18,0x1E1A,0x1E1C,0x1E1E,0x1E20,0x1E22,0x1E24,0x1E26,0x1E28,0x1E2A,0x1E2C,0x1E2E,0x1E30,0x1E32,0x1E34,0x1E36,0x1E38,0x1E3A,0x1E3C,0x1E3E,0x1E40,0x1E42,0x1E44,0x1E46,0x1E48,0x1E4A,0x1E4C,0x1E4E,0x1E50,0x1E52,0x1E54,0x1E56,0x1E58,0x1E5A,0x1E5C,0x1E5E,0x1E60,0x1E62,0x1E64,0x1E66,0x1E68,0x1E6A,0x1E6C,0x1E6E,0x1E70,0x1E72,0x1E74,0x1E76,0x1E78,0x1E7A,0x1E7C,0x1E7E,0x1E80,0x1E82,0x1E84,0x1E86,0x1E88,0x1E8A,0x1E8C,0x1E8E,0x1E90,0x1E92,0x1E94,0x1E96,0x1E98,0x1E9A,0x1E9C,0x1E9E,0x1EA0,0x1EA2,0x1EA4,0x1EA6,0x1EA8,0x1EAA,0x1EAC,0x1EAE,0x1EB0,0x1EB2,0x1EB4,0x1EB6,0x1EB8,0x1EBA,0x1EBC,0x1EBE,0x1EC0,0x1EC2,0x1EC4,0x1EC6,0x1EC8,0x1ECA,0x1ECC,0x1ECE,0x1ED0,0x1ED2,0x1ED4,0x1ED6,0x1ED8,0x1EDA,0x1EDC,0x1EDE,0x1EE0,0x1EE2,0x1EE4,0x1EE6,0x1EE8,0x1EEA,0x1EEC,0x1EEE,0x1EF0,0x1EF2,0x1EF4,0x1EF6,0x1EF8, |
annieluo2 | 0:d6c9b09b4042 | 327 | 0x2160,0x2161,0x2162,0x2163,0x2164,0x2165,0x2166,0x2167,0x2168,0x2169,0x216A,0x216B,0x216C,0x216D,0x216E,0x216F, |
annieluo2 | 0:d6c9b09b4042 | 328 | 0xFF21,0xFF22,0xFF23,0xFF24,0xFF25,0xFF26,0xFF27,0xFF28,0xFF29,0xFF2A,0xFF2B,0xFF2C,0xFF2D,0xFF2E,0xFF2F,0xFF30,0xFF31,0xFF32,0xFF33,0xFF34,0xFF35,0xFF36,0xFF37,0xFF38,0xFF39,0xFF3A |
annieluo2 | 0:d6c9b09b4042 | 329 | }; |
annieluo2 | 0:d6c9b09b4042 | 330 | UINT i, n, hi, li; |
annieluo2 | 0:d6c9b09b4042 | 331 | |
annieluo2 | 0:d6c9b09b4042 | 332 | |
annieluo2 | 0:d6c9b09b4042 | 333 | if (chr < 0x80) { /* ASCII characters (acceleration) */ |
annieluo2 | 0:d6c9b09b4042 | 334 | if (chr >= 0x61 && chr <= 0x7A) chr -= 0x20; |
annieluo2 | 0:d6c9b09b4042 | 335 | |
annieluo2 | 0:d6c9b09b4042 | 336 | } else { /* Non ASCII characters (table search) */ |
annieluo2 | 0:d6c9b09b4042 | 337 | n = 12; li = 0; hi = sizeof lower / sizeof lower[0]; |
annieluo2 | 0:d6c9b09b4042 | 338 | do { |
annieluo2 | 0:d6c9b09b4042 | 339 | i = li + (hi - li) / 2; |
annieluo2 | 0:d6c9b09b4042 | 340 | if (chr == lower[i]) break; |
annieluo2 | 0:d6c9b09b4042 | 341 | if (chr > lower[i]) li = i; else hi = i; |
annieluo2 | 0:d6c9b09b4042 | 342 | } while (--n); |
annieluo2 | 0:d6c9b09b4042 | 343 | if (n) chr = upper[i]; |
annieluo2 | 0:d6c9b09b4042 | 344 | } |
annieluo2 | 0:d6c9b09b4042 | 345 | |
annieluo2 | 0:d6c9b09b4042 | 346 | return chr; |
annieluo2 | 0:d6c9b09b4042 | 347 | } |
annieluo2 | 0:d6c9b09b4042 | 348 |