diff options
Diffstat (limited to 'firmware/common/unicode.c')
-rw-r--r-- | firmware/common/unicode.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/firmware/common/unicode.c b/firmware/common/unicode.c index 3ad63ee4fb..2bb7bfb943 100644 --- a/firmware/common/unicode.c +++ b/firmware/common/unicode.c | |||
@@ -79,6 +79,35 @@ static const char * const name_codepages[NUM_CODEPAGES+1] = | |||
79 | "unknown" | 79 | "unknown" |
80 | }; | 80 | }; |
81 | 81 | ||
82 | #if defined(APPLICATION) && defined(__linux__) | ||
83 | static const char * const name_codepages_linux[NUM_CODEPAGES+1] = | ||
84 | { | ||
85 | "iso8859-1", | ||
86 | "iso8859-7", | ||
87 | "iso8859-8", | ||
88 | "cp1251", | ||
89 | "iso8859-11", | ||
90 | "cp1256", | ||
91 | "iso8859-9", | ||
92 | "iso8859-2", | ||
93 | "cp1250", | ||
94 | "iso8859-15" /* closest, linux doesnt have a codepage named cp1252 */ | ||
95 | "cp932", | ||
96 | "cp936", | ||
97 | "cp949", | ||
98 | "cp950", | ||
99 | "utf8", | ||
100 | "cp437" | ||
101 | }; | ||
102 | |||
103 | const char *get_current_codepage_name_linux(void) | ||
104 | { | ||
105 | if (default_codepage < 0 || default_codepage >= NUM_CODEPAGES) | ||
106 | return name_codepages_linux[NUM_CODEPAGES]; | ||
107 | return name_codepages_linux[default_codepage]; | ||
108 | } | ||
109 | #endif | ||
110 | |||
82 | #else /* !HAVE_LCD_BITMAP, reduced support */ | 111 | #else /* !HAVE_LCD_BITMAP, reduced support */ |
83 | 112 | ||
84 | #define MAX_CP_TABLE_SIZE 768 | 113 | #define MAX_CP_TABLE_SIZE 768 |