Index: tools/codepage_tables.c =================================================================== --- tools/codepage_tables.c (revision 14604) +++ tools/codepage_tables.c (working copy) @@ -25,6 +25,25 @@ 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x0384, 0x0385, 0x0386, 0x00B7 /* B0-B7 */ }; +const unsigned short cp1250_to_uni[] = { + 0x20AC, 0x00A0, 0x201A, 0x00A0, 0x201E, 0x2026, 0x2020, 0x2021, /* 80-87 */ + 0x00A0, 0x2030, 0x0160, 0x2039, 0x015A, 0x0164, 0x017D, 0x0179, /* 88-8F */ + 0x00A0, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, /* 90-97 */ + 0x00A0, 0x2122, 0x0161, 0x203A, 0x015B, 0x0165, 0x017E, 0x017A, /* 98-9F */ + 0x00A0, 0x02C7, 0x02D8, 0x0141, 0x00A4, 0x0104, 0x00A6, 0x00A7, /* A0-A7 */ + 0x00A8, 0x00A9, 0x015E, 0x00AB, 0x00AC, 0X00AD, 0x00AE, 0x017B, /* A8-AF */ + 0x00B0, 0x00B1, 0x02DB, 0x0142, 0x00B4, 0x00B5, 0x00B6, 0x00B7, /* B0-B7 */ + 0x00B8, 0x0105, 0x015F, 0x00BB, 0x013D, 0x02DD, 0x013E, 0x017C, /* B8-BF */ + 0x0154, 0x00C1, 0x00C2, 0x0102, 0x00C4, 0x0139, 0x0106, 0x00C7, /* C0-C7 */ + 0x010C, 0x00C9, 0x0118, 0x00CB, 0x011A, 0x00CD, 0x00CE, 0x010E, /* C8-CF */ + 0x0110, 0x0143, 0x0147, 0x00D3, 0x00D4, 0x0150, 0x00D6, 0x00D7, /* D0-D7 */ + 0x0158, 0x016E, 0x00DA, 0x0170, 0x00DC, 0x00DD, 0x0162, 0x00DF, /* D8-DF */ + 0x0155, 0x00E1, 0x00E2, 0x0103, 0x00E4, 0x013A, 0x0107, 0x00E7, /* E0-E7 */ + 0x010D, 0x00E9, 0x0119, 0x00EB, 0x011B, 0x00ED, 0x00EE, 0x010F, /* E8-EF */ + 0x0111, 0x0144, 0x0148, 0x00F3, 0x00F4, 0X0151, 0x00F6, 0x00F7, /* F0-F7 */ + 0x0159, 0x016F, 0x00FA, 0x0171, 0x00FC, 0x00FD, 0x0163, 0x02D9 /* F8-FA */ +}; + const unsigned short cp1251_to_uni[] = { 0x0402, 0x0403, 0x201A, 0x0453, 0x201E, 0x2026, 0x2020, 0x2021, /* 80-87 */ 0x20AC, 0x2030, 0x0409, 0x2039, 0x040A, 0x040C, 0x040B, 0x040F, /* 88-8F */ Index: tools/codepage_tables.h =================================================================== --- tools/codepage_tables.h (revision 14604) +++ tools/codepage_tables.h (working copy) @@ -18,6 +18,7 @@ ****************************************************************************/ extern const unsigned short iso8859_7_to_uni[]; +extern const unsigned short cp1250_to_uni[]; extern const unsigned short cp1251_to_uni[]; extern const unsigned short cp1256_to_uni[]; extern const unsigned short iso8859_2_to_uni[]; Index: tools/codepages.c =================================================================== --- tools/codepages.c (revision 14604) +++ tools/codepages.c (working copy) @@ -66,11 +66,21 @@ } break; - case 0x03: /* Cyrillic (CP1251) */ + case 0x03: /* Central European (CP1250) */ while (count--) { /* first convert to unicode */ if (*latin1 < 0x80) ucs = *latin1++; + else + ucs = cp1250_to_uni[*latin1++ - 0x80]; + } + break; + + case 0x04: /* Cyrillic (CP1251) */ + while (count--) { + /* first convert to unicode */ + if (*latin1 < 0x80) + ucs = *latin1++; else if (*latin1 > 0xBF) ucs = *latin1++ + 0x0350; else @@ -78,7 +88,7 @@ } break; - case 0x04: /* Thai (ISO-8859-11) */ + case 0x05: /* Thai (ISO-8859-11) */ while (count--) { /* first convert to unicode */ if (*latin1 < 0xA1) @@ -88,7 +98,7 @@ } break; - case 0x05: /* Arabic (CP1256) */ + case 0x06: /* Arabic (CP1256) */ while (count--) { /* first convert to unicode */ if (*latin1 < 0x80) @@ -98,7 +108,7 @@ } break; - case 0x06: /* Turkish (ISO-8859-9) */ + case 0x07: /* Turkish (ISO-8859-9) */ while (count--) { /* first convert to unicode */ switch (*latin1) { @@ -129,7 +139,7 @@ } break; - case 0x07: /* Latin Extended (ISO-8859-2) */ + case 0x08: /* Latin Extended (ISO-8859-2) */ while (count--) { /* first convert to unicode */ if (*latin1 < 0xA1) @@ -211,7 +221,7 @@ of = fopen("iso.cp", "wb"); if (!of) return 1; - for (i=1; i<8; i++) { + for (i=1; i<9; i++) { for (j=0; j<128; j++) { k = (unsigned char)j + 128; Index: apps/lang/polski.lang =================================================================== --- apps/lang/polski.lang (revision 14604) +++ apps/lang/polski.lang (working copy) @@ -1904,6 +1904,20 @@ + id: LANG_CODEPAGE_CENTRAL_EUROPEAN + desc: in codepage setting menu + user: + + *: "Europa Środkowa (CP1250)" + + + *: "Europa Środkowa (CP1250)" + + + *: "Europa Środkowa" + + + id: LANG_CODEPAGE_CYRILLIC desc: in codepage setting menu user: Index: apps/lang/english.lang =================================================================== --- apps/lang/english.lang (revision 14604) +++ apps/lang/english.lang (working copy) @@ -3723,6 +3723,20 @@ + id: LANG_CODEPAGE_CENTRAL_EUROPEAN + desc: in codepage setting menu + user: + + *: "Central European (CP1250)" + + + *: "Central European (CP1250)" + + + *: "Central Eurpean" + + + id: LANG_CODEPAGE_CYRILLIC desc: in codepage setting menu user: Index: apps/plugins/viewer.c =================================================================== --- apps/plugins/viewer.c (revision 14604) +++ apps/plugins/viewer.c (working copy) @@ -230,6 +230,7 @@ ISO_8859_1=0, ISO_8859_7, ISO_8859_8, + CP1250, CP1251, ISO_8859_11, ISO_8859_6, @@ -1177,6 +1178,7 @@ {"ISO-8859-1", -1}, {"ISO-8859-7", -1}, {"ISO-8859-8", -1}, + {"CP1250", -1}, {"CP1251", -1}, {"ISO-8859-11", -1}, {"ISO-8859-6", -1}, Index: apps/settings_list.c =================================================================== --- apps/settings_list.c (revision 14604) +++ apps/settings_list.c (working copy) @@ -1015,23 +1015,24 @@ "default codepage", #ifdef HAVE_LCD_BITMAP /* The order must match with that in unicode.c */ - "iso8859-1,iso8859-7,iso8859-8,cp1251,iso8859-11,cp1256," + "iso8859-1,iso8859-7,iso8859-8,cp1250,cp1251,iso8859-11,cp1256," "iso8859-9,iso8859-2,sjis,gb2312,ksx1001,big5,utf-8", - set_codepage, 13, + set_codepage, 14, ID2P(LANG_CODEPAGE_LATIN1), ID2P(LANG_CODEPAGE_GREEK), - ID2P(LANG_CODEPAGE_HEBREW), ID2P(LANG_CODEPAGE_CYRILLIC), - ID2P(LANG_CODEPAGE_THAI), ID2P(LANG_CODEPAGE_ARABIC), - ID2P(LANG_CODEPAGE_TURKISH), ID2P(LANG_CODEPAGE_LATIN_EXTENDED), - ID2P(LANG_CODEPAGE_JAPANESE), ID2P(LANG_CODEPAGE_SIMPLIFIED), - ID2P(LANG_CODEPAGE_KOREAN), ID2P(LANG_CODEPAGE_TRADITIONAL), - ID2P(LANG_CODEPAGE_UTF8)), + ID2P(LANG_CODEPAGE_HEBREW), ID2P(LANG_CODEPAGE_CENTRAL_EUROPEAN), + ID2P(LANG_CODEPAGE_CYRILLIC), ID2P(LANG_CODEPAGE_THAI), + ID2P(LANG_CODEPAGE_ARABIC), ID2P(LANG_CODEPAGE_TURKISH), + ID2P(LANG_CODEPAGE_LATIN_EXTENDED), ID2P(LANG_CODEPAGE_JAPANESE), + ID2P(LANG_CODEPAGE_SIMPLIFIED), ID2P(LANG_CODEPAGE_KOREAN), + ID2P(LANG_CODEPAGE_TRADITIONAL), ID2P(LANG_CODEPAGE_UTF8)), #else /* !HAVE_LCD_BITMAP */ /* The order must match with that in unicode.c */ - "iso8859-1,iso8859-7,cp1251,iso8859-9,iso8859-2,utf-8", - set_codepage, 6, + "iso8859-1,iso8859-7,cp1250,cp1251,iso8859-9,iso8859-2,utf-8", + set_codepage, 7, ID2P(LANG_CODEPAGE_LATIN1), ID2P(LANG_CODEPAGE_GREEK), - ID2P(LANG_CODEPAGE_CYRILLIC), ID2P(LANG_CODEPAGE_TURKISH), - ID2P(LANG_CODEPAGE_LATIN_EXTENDED), ID2P(LANG_CODEPAGE_UTF8)), + ID2P(LANG_CODEPAGE_CENTRAL_EUROPEAN), ID2P(LANG_CODEPAGE_CYRILLIC), + ID2P(LANG_CODEPAGE_TURKISH), ID2P(LANG_CODEPAGE_LATIN_EXTENDED), + ID2P(LANG_CODEPAGE_UTF8)), #endif OFFON_SETTING(0,warnon_erase_dynplaylist, LANG_WARN_ERASEDYNPLAYLIST_MENU,false, Index: firmware/common/unicode.c =================================================================== --- firmware/common/unicode.c (revision 14604) +++ firmware/common/unicode.c (working copy) @@ -28,8 +28,8 @@ #define NUM_TABLES 5 enum { - ISO_8859_1 = 0, ISO_8859_7, ISO_8859_8, WIN_1251, - ISO_8859_11, WIN_1256, ISO_8859_9, ISO_8859_2, + ISO_8859_1 = 0, ISO_8859_7, ISO_8859_8, WIN_1250, + WIN_1251, ISO_8859_11, WIN_1256, ISO_8859_9, ISO_8859_2, SJIS, GB_2312, KSX_1001, BIG_5, UTF_8, NUM_CODEPAGES }; static const char *filename[NUM_TABLES] = @@ -42,7 +42,7 @@ }; static const char cp_2_table[NUM_CODEPAGES] = { - 0, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 0 + 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 0 }; #else /* !HAVE_LCD_BITMAP, reduced support */ @@ -51,7 +51,7 @@ #define NUM_TABLES 1 enum { - ISO_8859_1 = 0, ISO_8859_7, WIN_1251, + ISO_8859_1 = 0, ISO_8859_7, WIN_1250, WIN_1251, ISO_8859_9, ISO_8859_2, UTF_8, NUM_CODEPAGES }; static const char *filename[NUM_TABLES] = @@ -60,7 +60,7 @@ }; static const char cp_2_table[NUM_CODEPAGES] = { - 0, 1, 1, 1, 1, 0 + 0, 1, 1, 1, 1, 1, 0 }; #endif @@ -149,6 +149,7 @@ /* cp tells us which codepage to convert from */ switch (cp) { case ISO_8859_7: /* Greek */ + case WIN_1250: /* Central European */ case WIN_1251: /* Cyrillic */ case ISO_8859_9: /* Turkish */ case ISO_8859_2: /* Latin Extended */