summaryrefslogtreecommitdiffstats
path: root/libmpdemux/asf_mmst_streaming.c
diff options
context:
space:
mode:
authoralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-06-26 09:54:02 +0000
committeralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-06-26 09:54:02 +0000
commite69fef945b148b2b34a25f8501a8562a8b337264 (patch)
tree13cdeb2d2380ecec968ad04eb5f62cc9df8c98a5 /libmpdemux/asf_mmst_streaming.c
parent309e81bcee08bef5fd0f0f3bb2e22bd0b1a4e282 (diff)
downloadmpv-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/asf_mmst_streaming.c')
-rw-r--r--libmpdemux/asf_mmst_streaming.c9
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));