X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cb719f2e29bd20effa3259d2d7dead9fd857442c..b404a8f3b072129c107c6d9a5e0f6f53cd34807b:/src/common/unictabl.inc?ds=sidebyside diff --git a/src/common/unictabl.inc b/src/common/unictabl.inc index efe0e24bdd..5bb0e1d311 100644 --- a/src/common/unictabl.inc +++ b/src/common/unictabl.inc @@ -11,7 +11,7 @@ * * Parts of this file are based on tables published by Unicode, Inc. * Original tables are freely available at - * ftp://ftp.unicode.org/MAPPINGS + * ftp://ftp.unicode.org/Public/MAPPINGS * * Original copyright info as present in mapping tables follows: * @@ -41,7 +41,7 @@ * based on file mappings/8859-1.TXT by Unicode Consortium */ -static wxUint16 encoding_table__ISO8859_1[128] = { +static const wxUint16 encoding_table__ISO8859_1[128] = { 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, @@ -66,7 +66,7 @@ static wxUint16 encoding_table__ISO8859_1[128] = { * based on file mappings/8859-10.TXT by Unicode Consortium */ -static wxUint16 encoding_table__ISO8859_10[128] = { +static const wxUint16 encoding_table__ISO8859_10[128] = { 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, @@ -91,7 +91,7 @@ static wxUint16 encoding_table__ISO8859_10[128] = { * based on file mappings/8859-13.TXT by Unicode Consortium */ -static wxUint16 encoding_table__ISO8859_13[128] = { +static const wxUint16 encoding_table__ISO8859_13[128] = { 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, @@ -116,7 +116,7 @@ static wxUint16 encoding_table__ISO8859_13[128] = { * based on file mappings/8859-14.TXT by Unicode Consortium */ -static wxUint16 encoding_table__ISO8859_14[128] = { +static const wxUint16 encoding_table__ISO8859_14[128] = { 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, @@ -141,7 +141,7 @@ static wxUint16 encoding_table__ISO8859_14[128] = { * based on file mappings/8859-15.TXT by Unicode Consortium */ -static wxUint16 encoding_table__ISO8859_15[128] = { +static const wxUint16 encoding_table__ISO8859_15[128] = { 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, @@ -166,7 +166,7 @@ static wxUint16 encoding_table__ISO8859_15[128] = { * based on file mappings/8859-2.TXT by Unicode Consortium */ -static wxUint16 encoding_table__ISO8859_2[128] = { +static const wxUint16 encoding_table__ISO8859_2[128] = { 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, @@ -191,7 +191,7 @@ static wxUint16 encoding_table__ISO8859_2[128] = { * based on file mappings/8859-3.TXT by Unicode Consortium */ -static wxUint16 encoding_table__ISO8859_3[128] = { +static const wxUint16 encoding_table__ISO8859_3[128] = { 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, @@ -216,7 +216,7 @@ static wxUint16 encoding_table__ISO8859_3[128] = { * based on file mappings/8859-4.TXT by Unicode Consortium */ -static wxUint16 encoding_table__ISO8859_4[128] = { +static const wxUint16 encoding_table__ISO8859_4[128] = { 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, @@ -241,7 +241,7 @@ static wxUint16 encoding_table__ISO8859_4[128] = { * based on file mappings/8859-5.TXT by Unicode Consortium */ -static wxUint16 encoding_table__ISO8859_5[128] = { +static const wxUint16 encoding_table__ISO8859_5[128] = { 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, @@ -266,7 +266,7 @@ static wxUint16 encoding_table__ISO8859_5[128] = { * based on file mappings/8859-6.TXT by Unicode Consortium */ -static wxUint16 encoding_table__ISO8859_6[128] = { +static const wxUint16 encoding_table__ISO8859_6[128] = { 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, @@ -291,7 +291,7 @@ static wxUint16 encoding_table__ISO8859_6[128] = { * based on file mappings/8859-7.TXT by Unicode Consortium */ -static wxUint16 encoding_table__ISO8859_7[128] = { +static const wxUint16 encoding_table__ISO8859_7[128] = { 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, @@ -316,7 +316,7 @@ static wxUint16 encoding_table__ISO8859_7[128] = { * based on file mappings/8859-8.TXT by Unicode Consortium */ -static wxUint16 encoding_table__ISO8859_8[128] = { +static const wxUint16 encoding_table__ISO8859_8[128] = { 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, @@ -341,7 +341,7 @@ static wxUint16 encoding_table__ISO8859_8[128] = { * based on file mappings/8859-9.TXT by Unicode Consortium */ -static wxUint16 encoding_table__ISO8859_9[128] = { +static const wxUint16 encoding_table__ISO8859_9[128] = { 0x0080, 0x0081, 0x0082, 0x0083, 0x0084, 0x0085, 0x0086, 0x0087, 0x0088, 0x0089, 0x008A, 0x008B, 0x008C, 0x008D, 0x008E, 0x008F, 0x0090, 0x0091, 0x0092, 0x0093, 0x0094, 0x0095, 0x0096, 0x0097, @@ -366,7 +366,7 @@ static wxUint16 encoding_table__ISO8859_9[128] = { * based on file mappings/CP1250.TXT by Unicode Consortium */ -static wxUint16 encoding_table__CP1250[128] = { +static const wxUint16 encoding_table__CP1250[128] = { 0x20AC, 0x0000, 0x201A, 0x0000, 0x201E, 0x2026, 0x2020, 0x2021, 0x0000, 0x2030, 0x0160, 0x2039, 0x015A, 0x0164, 0x017D, 0x0179, 0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, @@ -391,7 +391,7 @@ static wxUint16 encoding_table__CP1250[128] = { * based on file mappings/CP1251.TXT by Unicode Consortium */ -static wxUint16 encoding_table__CP1251[128] = { +static const wxUint16 encoding_table__CP1251[128] = { 0x0402, 0x0403, 0x201A, 0x0453, 0x201E, 0x2026, 0x2020, 0x2021, 0x20AC, 0x2030, 0x0409, 0x2039, 0x040A, 0x040C, 0x040B, 0x040F, 0x0452, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, @@ -416,7 +416,7 @@ static wxUint16 encoding_table__CP1251[128] = { * based on file mappings/CP1252.TXT by Unicode Consortium */ -static wxUint16 encoding_table__CP1252[128] = { +static const wxUint16 encoding_table__CP1252[128] = { 0x20AC, 0x0000, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, 0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0x0000, 0x017D, 0x0000, 0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, @@ -441,7 +441,7 @@ static wxUint16 encoding_table__CP1252[128] = { * based on file mappings/CP1253.TXT by Unicode Consortium */ -static wxUint16 encoding_table__CP1253[128] = { +static const wxUint16 encoding_table__CP1253[128] = { 0x20AC, 0x0000, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, 0x0000, 0x2030, 0x0000, 0x2039, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, @@ -466,7 +466,7 @@ static wxUint16 encoding_table__CP1253[128] = { * based on file mappings/CP1254.TXT by Unicode Consortium */ -static wxUint16 encoding_table__CP1254[128] = { +static const wxUint16 encoding_table__CP1254[128] = { 0x20AC, 0x0000, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, 0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0x0000, 0x0000, 0x0000, 0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, @@ -491,7 +491,7 @@ static wxUint16 encoding_table__CP1254[128] = { * based on file mappings/CP1255.TXT by Unicode Consortium */ -static wxUint16 encoding_table__CP1255[128] = { +static const wxUint16 encoding_table__CP1255[128] = { 0x20AC, 0x0000, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, 0x02C6, 0x2030, 0x0000, 0x2039, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, @@ -516,7 +516,7 @@ static wxUint16 encoding_table__CP1255[128] = { * based on file mappings/CP1256.TXT by Unicode Consortium */ -static wxUint16 encoding_table__CP1256[128] = { +static const wxUint16 encoding_table__CP1256[128] = { 0x20AC, 0x067E, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, 0x02C6, 0x2030, 0x0679, 0x2039, 0x0152, 0x0686, 0x0698, 0x0688, 0x06AF, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, @@ -541,7 +541,7 @@ static wxUint16 encoding_table__CP1256[128] = { * based on file mappings/CP1257.TXT by Unicode Consortium */ -static wxUint16 encoding_table__CP1257[128] = { +static const wxUint16 encoding_table__CP1257[128] = { 0x20AC, 0x0000, 0x201A, 0x0000, 0x201E, 0x2026, 0x2020, 0x2021, 0x0000, 0x2030, 0x0000, 0x2039, 0x0000, 0x00A8, 0x02C7, 0x00B8, 0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, @@ -561,12 +561,37 @@ static wxUint16 encoding_table__CP1257[128] = { }; +/* + * CP866 to Unicode recoding table + * based on file mappings/CP866.TXT by Unicode Consortium + */ + +static const wxUint16 encoding_table__CP866[128] = { + 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, + 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F, + 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, + 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F, + 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, + 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F, + 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, + 0x2555, 0x2563, 0x2551, 0x2557, 0x255D, 0x255C, 0x255B, 0x2510, + 0x2514, 0x2534, 0x252C, 0x251C, 0x2500, 0x253C, 0x255E, 0x255F, + 0x255A, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256C, 0x2567, + 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256B, + 0x256A, 0x2518, 0x250C, 0x2588, 0x2584, 0x258C, 0x2590, 0x2580, + 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, + 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F, + 0x0401, 0x0451, 0x0404, 0x0454, 0x0407, 0x0457, 0x040E, 0x045E, + 0x00B0, 0x2219, 0x00B7, 0x221A, 0x2116, 0x00A4, 0x25A0, 0x00A0 + }; + + /* * KOI8 to Unicode recoding table * based on file mappings/KOI8-R.TXT by Unicode Consortium */ -static wxUint16 encoding_table__KOI8[128] = { +static const wxUint16 encoding_table__KOI8[128] = { 0x2500, 0x2502, 0x250C, 0x2510, 0x2514, 0x2518, 0x251C, 0x2524, 0x252C, 0x2534, 0x253C, 0x2580, 0x2584, 0x2588, 0x258C, 0x2590, 0x2591, 0x2592, 0x2593, 0x2320, 0x25A0, 0x2219, 0x221A, 0x2248, @@ -591,7 +616,7 @@ static wxUint16 encoding_table__KOI8[128] = { * based on file mappings/KOI8-U.TXT by Unicode Consortium */ -static wxUint16 encoding_table__KOI8_U[128] = { +static const wxUint16 encoding_table__KOI8_U[128] = { 0x2500, 0x2502, 0x250C, 0x2510, 0x2514, 0x2518, 0x251C, 0x2524, 0x252C, 0x2534, 0x253C, 0x2580, 0x2584, 0x2588, 0x258C, 0x2590, 0x2591, 0x2592, 0x2593, 0x2320, 0x25A0, 0x2219, 0x221A, 0x2248, @@ -621,7 +646,7 @@ static wxUint16 encoding_table__KOI8_U[128] = { * */ -static struct { +static const struct { wxUint16 c /*code*/; wxUint8 s /*inaccurate substitution*/; } encoding_unicode_fallback[] = { @@ -829,7 +854,7 @@ static struct { {0, 0} }; -static unsigned encoding_unicode_fallback_count = 200; +static const unsigned encoding_unicode_fallback_count = 200; @@ -840,9 +865,9 @@ static unsigned encoding_unicode_fallback_count = 200; * */ -static struct { +static const struct { wxFontEncoding encoding; // encoding identifier - wxUint16 *table; // 8bit to unicode table + const wxUint16 *table; // 8bit to unicode table } encodings_list[] = { { wxFONTENCODING_ISO8859_1, encoding_table__ISO8859_1}, @@ -868,5 +893,6 @@ static struct { { wxFONTENCODING_CP1257, encoding_table__CP1257}, { wxFONTENCODING_KOI8, encoding_table__KOI8}, { wxFONTENCODING_KOI8_U, encoding_table__KOI8_U}, + { wxFONTENCODING_CP866, encoding_table__CP866}, {wxFONTENCODING_MAX /*anything*/, NULL} };