[MPlayer-dev-eng] [PATCH] localize with gettext (libintl)

Ötvös Attila oattila at chello.hu
Thu Nov 30 02:08:41 CET 2006


2006. november 30. 01.46 dátummal Reimar Döffinger ezt írta:
> Hello,
>
> > mp_msg_init()
> > ...
> > setlocale(LC_MESSAGES,"");	// set lc_messages
> > setlocale(LC_TYPE,"");		// locale character ...
> > bindtextdomain("mplayer","/usr/share/locale");
> > bind_textdomain_codeset("mplayer",nl_langinfo(CODESET));
> > textdomain("mplayer");
> > setlocale(LC_TYPE,"C");		// locale default
>
> I think nl_langinfo(CODESET) is wrong, it should be MSG_CHARSET instead
> (normally UTF-8) and MPlayer will then convert it as necessary.
>
Hi Reimar Döffinger!

I correction:

setlocale(LC_MESSAGES,"");
bindtextdomain(...)
textdomain(..)
bind_textdomain_codeset("mplayer",mp_msg_charset);

Drop setlocale(LC_ALL,""), setlocale(LC_CTYPE,"")

Comment?

Best regards.
Attila
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2-mp_msg.c.patch
Type: text/x-diff
Size: 2354 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20061130/17f42b7a/attachment.patch>


More information about the MPlayer-dev-eng mailing list