summaryrefslogtreecommitdiffstats
path: root/osdep/getch2-win.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-07-31 01:35:53 +0200
committerwm4 <wm4@nowhere>2012-07-31 01:35:53 +0200
commit6e020e66e0e454e8c7f1eeb17e85b90262e95386 (patch)
tree0cace859c7775e6066dbe9fcb3f742269bf84657 /osdep/getch2-win.c
parentc78ba1c55c86db4d17583f7c8eb5b9034ae98193 (diff)
downloadmpv-6e020e66e0e454e8c7f1eeb17e85b90262e95386.tar.bz2
mpv-6e020e66e0e454e8c7f1eeb17e85b90262e95386.tar.xz
mp_msg: remove filename_recode
This was intended for translating filenames from filesystem charset to the terminal charset. Modern sane platforms use UTF-8 for everything, and on Windows we use unicode APIs, so this is not needed anymore. Remove filename_recode, all uses of it, options and configure checks related to terminal output charset, and code that tries to determine the same.
Diffstat (limited to 'osdep/getch2-win.c')
-rw-r--r--osdep/getch2-win.c40
1 files changed, 0 insertions, 40 deletions
diff --git a/osdep/getch2-win.c b/osdep/getch2-win.c
index f1ccea6359..de886182c9 100644
--- a/osdep/getch2-win.c
+++ b/osdep/getch2-win.c
@@ -183,43 +183,3 @@ void getch2_disable(void)
if(!getch2_status) return; // already disabled / never enabled
getch2_status=0;
}
-
-#ifdef CONFIG_ICONV
-static const struct {
- unsigned cp;
- char* alias;
-} cp_alias[] = {
- { 20127, "ASCII" },
- { 20866, "KOI8-R" },
- { 21866, "KOI8-RU" },
- { 28591, "ISO-8859-1" },
- { 28592, "ISO-8859-2" },
- { 28593, "ISO-8859-3" },
- { 28594, "ISO-8859-4" },
- { 28595, "ISO-8859-5" },
- { 28596, "ISO-8859-6" },
- { 28597, "ISO-8859-7" },
- { 28598, "ISO-8859-8" },
- { 28599, "ISO-8859-9" },
- { 28605, "ISO-8859-15" },
- { 65001, "UTF-8" },
- { 0, NULL }
-};
-
-char* get_term_charset(void)
-{
- char codepage[10];
- unsigned i, cpno = GetConsoleOutputCP();
- if (!cpno)
- cpno = GetACP();
- if (!cpno)
- return NULL;
-
- for (i = 0; cp_alias[i].cp; i++)
- if (cpno == cp_alias[i].cp)
- return strdup(cp_alias[i].alias);
-
- snprintf(codepage, sizeof(codepage), "CP%u", cpno);
- return strdup(codepage);
-}
-#endif