Mercurial > mplayer.hg
diff libmpdemux/asf_mmst_streaming.c @ 12674:0392f36045f4
user nl_langinfo if langinfo support present for proper chinese support, feature requested by Shixin Zheng <shixinzheng@sjtu.edu.cn>
author | alex |
---|---|
date | Sat, 26 Jun 2004 09:54:02 +0000 |
parents | 868376f81c30 |
children | 7c5dee73a7dc |
line wrap: on
line diff
--- a/libmpdemux/asf_mmst_streaming.c Sat Jun 26 09:21:07 2004 +0000 +++ b/libmpdemux/asf_mmst_streaming.c Sat Jun 26 09:54:02 2004 +0000 @@ -23,8 +23,11 @@ #endif #ifdef USE_ICONV +#include <iconv.h> +#ifdef USE_LANGINFO +#include <langinfo.h> +#endif #include <locale.h> -#include <iconv.h> #endif #include "url.h" @@ -490,8 +493,12 @@ /* 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));