2009-08-24 Corinna Vinschen <corinna@vinschen.de>
* libc/locale/locale.c: Update documentation. (loadlocale): Map "KOI8-R" and "KOI8-U" to CP20866 and CP21866. 2009-08-24 Andy Koppe <andy.koppe@gmail.com> * libc/stdlib/sb_charsets.c (__cp_conv): Add KOI8-R (Russian, CP20866) and KOI8-U (Ukrainian, CP21866) to Windows codepage conversion tables. * libc/ctype/ctype_cp.h (__ctype_cp): Likewise for ctype tables.
This commit is contained in:
@ -203,7 +203,7 @@ wchar_t __iso_8859_conv[14][0x60] = {
|
||||
value (function __cp_index), the second index is the value of the
|
||||
incoming character - 0x80.
|
||||
Values < 0x80 don't have to be converted anyway. */
|
||||
wchar_t __cp_conv[22][0x80] = {
|
||||
wchar_t __cp_conv[24][0x80] = {
|
||||
/* CP437 */
|
||||
{ 0xc7, 0xfc, 0xe9, 0xe2, 0xe4, 0xe0, 0xe5, 0xe7,
|
||||
0xea, 0xeb, 0xe8, 0xef, 0xee, 0xec, 0xc4, 0xc5,
|
||||
@ -577,7 +577,41 @@ wchar_t __cp_conv[22][0x80] = {
|
||||
0xe0, 0xe1, 0xe2, 0x103, 0xe4, 0xe5, 0xe6, 0xe7,
|
||||
0xe8, 0xe9, 0xea, 0xeb, 0x301, 0xed, 0xee, 0xef,
|
||||
0x111, 0xf1, 0x323, 0xf3, 0xf4, 0x1a1, 0xf6, 0xf7,
|
||||
0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0x1b0, 0x20ab, 0xff }
|
||||
0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0x1b0, 0x20ab, 0xff },
|
||||
/* CP20866 (KOI8-R) */
|
||||
{ 0x2500, 0x2502, 0x250c, 0x2510, 0x2514, 0x2518, 0x251c, 0x2524,
|
||||
0x252c, 0x2534, 0x253c, 0x2580, 0x2584, 0x2588, 0x258c, 0x2590,
|
||||
0x2591, 0x2592, 0x2593, 0x2320, 0x25a0, 0x2219, 0x221a, 0x2248,
|
||||
0x2264, 0x2265, 0xa0, 0x2321, 0xb0, 0xb2, 0xb7, 0xf7,
|
||||
0x2550, 0x2551, 0x2552, 0x451, 0x2553, 0x2554, 0x2555, 0x2556,
|
||||
0x2557, 0x2558, 0x2559, 0x255a, 0x255b, 0x255c, 0x255d, 0x255e,
|
||||
0x255f, 0x2560, 0x2561, 0x401, 0x2562, 0x2563, 0x2564, 0x2565,
|
||||
0x2566, 0x2567, 0x2568, 0x2569, 0x256a, 0x256b, 0x256c, 0xa9,
|
||||
0x44e, 0x430, 0x431, 0x446, 0x434, 0x435, 0x444, 0x433,
|
||||
0x445, 0x438, 0x439, 0x43a, 0x43b, 0x43c, 0x43d, 0x43e,
|
||||
0x43f, 0x44f, 0x440, 0x441, 0x442, 0x443, 0x436, 0x432,
|
||||
0x44c, 0x44b, 0x437, 0x448, 0x44d, 0x449, 0x447, 0x44a,
|
||||
0x42e, 0x410, 0x411, 0x426, 0x414, 0x415, 0x424, 0x413,
|
||||
0x425, 0x418, 0x419, 0x41a, 0x41b, 0x41c, 0x41d, 0x41e,
|
||||
0x41f, 0x42f, 0x420, 0x421, 0x422, 0x423, 0x416, 0x412,
|
||||
0x42c, 0x42b, 0x417, 0x428, 0x42d, 0x429, 0x427, 0x42a },
|
||||
/* CP21866 (KOI8-U) */
|
||||
{ 0x2500, 0x2502, 0x250c, 0x2510, 0x2514, 0x2518, 0x251c, 0x2524,
|
||||
0x252c, 0x2534, 0x253c, 0x2580, 0x2584, 0x2588, 0x258c, 0x2590,
|
||||
0x2591, 0x2592, 0x2593, 0x2320, 0x25a0, 0x2219, 0x221a, 0x2248,
|
||||
0x2264, 0x2265, 0xa0, 0x2321, 0xb0, 0xb2, 0xb7, 0xf7,
|
||||
0x2550, 0x2551, 0x2552, 0x451, 0x454, 0x2554, 0x456, 0x457,
|
||||
0x2557, 0x2558, 0x2559, 0x255a, 0x255b, 0x491, 0x255d, 0x255e,
|
||||
0x255f, 0x2560, 0x2561, 0x401, 0x404, 0x2563, 0x406, 0x407,
|
||||
0x2566, 0x2567, 0x2568, 0x2569, 0x256a, 0x490, 0x256c, 0xa9,
|
||||
0x44e, 0x430, 0x431, 0x446, 0x434, 0x435, 0x444, 0x433,
|
||||
0x445, 0x438, 0x439, 0x43a, 0x43b, 0x43c, 0x43d, 0x43e,
|
||||
0x43f, 0x44f, 0x440, 0x441, 0x442, 0x443, 0x436, 0x432,
|
||||
0x44c, 0x44b, 0x437, 0x448, 0x44d, 0x449, 0x447, 0x44a,
|
||||
0x42e, 0x410, 0x411, 0x426, 0x414, 0x415, 0x424, 0x413,
|
||||
0x425, 0x418, 0x419, 0x41a, 0x41b, 0x41c, 0x41d, 0x41e,
|
||||
0x41f, 0x42f, 0x420, 0x421, 0x422, 0x423, 0x416, 0x412,
|
||||
0x42c, 0x42b, 0x417, 0x428, 0x42d, 0x429, 0x427, 0x42a }
|
||||
};
|
||||
#endif /* _MB_EXTENDED_CHARSETS_WINDOWS */
|
||||
|
||||
@ -687,6 +721,12 @@ __cp_index (const char *charset_ext)
|
||||
case 1258:
|
||||
cp_idx = 21;
|
||||
break;
|
||||
case 20866:
|
||||
cp_idx = 22;
|
||||
break;
|
||||
case 21866:
|
||||
cp_idx = 23;
|
||||
break;
|
||||
default:
|
||||
cp_idx = -1;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user