diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-03-04 19:04:08 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-03-04 19:04:08 +0000 |
commit | a188335a339bea5d07f8d79ea105446362f3a95e (patch) | |
tree | e61e7af5e46acd6ee2d708bd33c8bf9d23414385 /mp_msg.c | |
parent | 9ca5decb0b51bedea1de69e088db5631156508fd (diff) | |
download | mpv-a188335a339bea5d07f8d79ea105446362f3a95e.tar.bz2 mpv-a188335a339bea5d07f8d79ea105446362f3a95e.tar.xz |
Add code to detect and convert to console codepage on Windows.
Patch by Zuxy Meng [zuxy.meng at gmail com]
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22460 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mp_msg.c')
-rw-r--r-- | mp_msg.c | 14 |
1 files changed, 3 insertions, 11 deletions
@@ -8,13 +8,10 @@ #include "config.h" -#ifdef USE_LANGINFO -#include <locale.h> -#include <langinfo.h> -#endif #ifdef USE_ICONV #include <iconv.h> #include <errno.h> +extern char* get_term_charset(); #endif #if defined(FOR_MENCODER) || defined(CODECS2HTML) @@ -79,13 +76,8 @@ void mp_msg_init(void){ mp_msg_levels[MSGT_IDENTIFY] = -1; // no -identify output by default #ifdef USE_ICONV mp_msg_charset = getenv("MPLAYER_CHARSET"); -#ifdef USE_LANGINFO - if (!mp_msg_charset) { - setlocale(LC_CTYPE, ""); - mp_msg_charset = nl_langinfo(CODESET); - setlocale(LC_CTYPE, "C"); - } -#endif + if (!mp_msg_charset) + mp_msg_charset = get_term_charset(); #endif } |