Index: tools/codepage_tables.c =================================================================== --- tools/codepage_tables.c (revision 14871) +++ 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 14871) +++ 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 14871) +++ tools/codepages.c (working copy) @@ -138,7 +138,17 @@ ucs = iso8859_2_to_uni[*latin1++ - 0xA1]; } break; - + + case 0x08: /* Central European (CP1250) */ + while (count--) { + /* first convert to unicode */ + if (*latin1 < 0x80) + ucs = *latin1++; + else + ucs = cp1250_to_uni[*latin1++ - 0x80]; + } + break; + default: break; } @@ -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 14871) +++ apps/lang/polski.lang (working copy) @@ -11038,3 +11038,17 @@ radio: "Menu Radia FM" + + id: LANG_CODEPAGE_CENTRAL_EUROPEAN + desc: in codepage setting menu + user: + + *: "Europa Środkowa (CP1250)" + + + *: "Europa Środkowa (CP1250)" + + + *: "Europa Środkowa" + + Index: apps/lang/english.lang =================================================================== --- apps/lang/english.lang (revision 14871) +++ apps/lang/english.lang (working copy) @@ -11327,4 +11327,17 @@ lcd_color: "Bar (Gradient Colour)" - + + id: LANG_CODEPAGE_CENTRAL_EUROPEAN + desc: in codepage setting menu + user: + + *: "Central European (CP1250)" + + + *: "Central European (CP1250)" + + + *: "Central Eurpean" + + Index: apps/plugins/viewer.c =================================================================== --- apps/plugins/viewer.c (revision 14871) +++ apps/plugins/viewer.c (working copy) @@ -247,6 +247,7 @@ ISO_8859_6, ISO_8859_9, ISO_8859_2, + CP1250, SJIS, GB2312, KSX1001, @@ -1191,6 +1192,7 @@ {"ISO-8859-6", -1}, {"ISO-8859-9", -1}, {"ISO-8859-2", -1}, + {"CP1250", -1}, {"SJIS", -1}, {"GB-2312", -1}, {"KSX-1001", -1}, Index: apps/settings_list.c =================================================================== --- apps/settings_list.c (revision 14871) +++ apps/settings_list.c (working copy) @@ -1027,22 +1027,23 @@ #ifdef HAVE_LCD_BITMAP /* The order must match with that in unicode.c */ "iso8859-1,iso8859-7,iso8859-8,cp1251,iso8859-11,cp1256," - "iso8859-9,iso8859-2,sjis,gb2312,ksx1001,big5,utf-8", - set_codepage, 13, + "iso8859-9,iso8859-2,cp1250,sjis,gb2312,ksx1001,big5,utf-8", + 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_CENTRAL_EUROPEAN), 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,cp1251,iso8859-9,iso8859-2,cp1250,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_LATIN_EXTENDED), ID2P(LANG_CODEPAGE_CENTRAL_EUROPEAN), + 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 14871) +++ firmware/common/unicode.c (working copy) @@ -29,7 +29,7 @@ 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_11, WIN_1256, ISO_8859_9, ISO_8859_2, WIN_1250, 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,8 +51,8 @@ #define NUM_TABLES 1 enum { - ISO_8859_1 = 0, ISO_8859_7, WIN_1251, - ISO_8859_9, ISO_8859_2, UTF_8, NUM_CODEPAGES + ISO_8859_1 = 0, ISO_8859_7, WIN_1251, ISO_8859_9, + ISO_8859_2, WIN_1250, 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 @@ -152,6 +152,7 @@ case WIN_1251: /* Cyrillic */ case ISO_8859_9: /* Turkish */ case ISO_8859_2: /* Latin Extended */ + case WIN_1250: /* Central European */ #ifdef HAVE_LCD_BITMAP case ISO_8859_8: /* Hebrew */ case ISO_8859_11: /* Thai */