diff options
author | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-06-26 09:54:02 +0000 |
---|---|---|
committer | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-06-26 09:54:02 +0000 |
commit | e69fef945b148b2b34a25f8501a8562a8b337264 (patch) | |
tree | 13cdeb2d2380ecec968ad04eb5f62cc9df8c98a5 /libmpdemux | |
parent | 309e81bcee08bef5fd0f0f3bb2e22bd0b1a4e282 (diff) | |
download | mpv-e69fef945b148b2b34a25f8501a8562a8b337264.tar.bz2 mpv-e69fef945b148b2b34a25f8501a8562a8b337264.tar.xz |
user nl_langinfo if langinfo support present for proper chinese support, feature requested by Shixin Zheng <shixinzheng@sjtu.edu.cn>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12675 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r-- | libmpdemux/asf_mmst_streaming.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libmpdemux/asf_mmst_streaming.c b/libmpdemux/asf_mmst_streaming.c index da3e766587..ec8ec2af97 100644 --- a/libmpdemux/asf_mmst_streaming.c +++ b/libmpdemux/asf_mmst_streaming.c @@ -23,8 +23,11 @@ #endif #ifdef USE_ICONV -#include <locale.h> #include <iconv.h> +#ifdef USE_LANGINFO +#include <langinfo.h> +#endif +#include <locale.h> #endif #include "url.h" @@ -490,8 +493,12 @@ int asf_mmst_streaming_start(stream_t *stream) /* prepare for the url encoding conversion */ #ifdef USE_ICONV setlocale(LC_CTYPE, ""); +#ifdef USE_LANGINFO + url_conv = iconv_open("UTF-16LE",nl_langinfo(CODESET)); +#else url_conv = iconv_open("UTF-16LE",setlocale(LC_CTYPE, NULL)); #endif +#endif snprintf (str, 1023, "\034\003NSPlayer/7.0.0.1956; {33715801-BAB3-9D85-24E9-03B90328270A}; Host: %s", url1->hostname); string_utf16 (data, str, strlen(str)); |