[MPlayer-dev-eng] [PATCH] GTK2 support
Rich Felker
dalias at aerifal.cx
Tue Feb 21 00:36:58 CET 2006
On Mon, Feb 20, 2006 at 12:06:24PM +0100, Artur Zaprza??a wrote:
> Reimar Doeffinger wrote:
> >Though I do not know how to detect the charset of the terminal...
>
> #include <langinfo.h>
> charset = strdup(nl_langinfo(CODESET));
>
> or use locale-dependent conversion functions like wcsrtombs instead of
> iconv.
Not acceptable. MPlayer would first have to process the UTF-8 into
wchar_t values, then call wcstombs. Moreover since MPlayer requires
the C locale, it would have to switch locales every time a message was
printed. This is horribly broken behavior.
I agree strongly that the other solution is the correct one -- using
setlocale only once to get nl_langinfo(CODESET) and then setting
locale back to C and using iconv.
Rich
More information about the MPlayer-dev-eng
mailing list