[MPlayer-dev-eng] [PATCH] implement the setlocale feature
Rich Felker
dalias at aerifal.cx
Mon Jun 19 00:26:50 CEST 2006
On Sun, Jun 18, 2006 at 11:49:03PM +0200, joerg at britannica.bec.de wrote:
> On Sun, Jun 18, 2006 at 11:34:41PM +0200, Dominik 'Rathann' Mierzejewski wrote:
> > On Sunday, 18 June 2006 at 23:02, Ivan Kalvachev wrote:
> > [...]
> > > 2. What kind of bug is the setlocale() change fixing? Doesn't it beat
> > > the purpose of using nl_langinfo()??
> >
> > I was under the impression that we didn't want any setlocale() calls
> > at all because they break various things.
>
> Calling setlocale is necessary to get the correct data from nl_langinfo,
> e.g. the charset that is supposed to get written.
>
> I know about the complains from Rich, but calling setlocale() once to
> get the correct information and calling it for a second time to force
> the C/POSIX locale avoids most of the issues.
Yes and this is already done in the only place it's needed, mp_msg
init. This asf crap does not need to know nl_langinfo(CODESET).
Instead it needs to always use UTF-8. This can be done without even
using iconv since the source data is UTF-16 and easily converted
directly.
Rich
More information about the MPlayer-dev-eng
mailing list