[MPlayer-dev-eng] [PATCH] Use _NET_WM_NAME for UTF-8 title in X11 if supported

Sergey Pinaev dfo at antex.ru
Wed Jun 21 13:36:06 CEST 2006


On Wed, 21 Jun 2006 13:28:43 +0200
Adam Tlałka <atlka at pg.gda.pl> wrote:

> #ifdef SUPPORT_NON_UTF8_LOCALES
> 		setlocale(LC_CTYPE, "");
> 		XmbTextListToTextProperty(dpy, (char **)&name, 1, XUTF8StringStyle,  
> &name_prop);
> 		setlocale(LC_CTYPE, "C");
> #else

imho it is better to:

char *oldctype = setlocale(LC_CTYPE, "");
...
setlocale(LC_CTYPE, oldctype);

in case sometime in future somebody adds something like
setlocale(LC_ALL, "albanian") somewhere in the code =)

-- 
mail="Sergey Pinaev <dfo at antex.ru>"
url="http://`echo $mail | sed 's/.* <\(.*\)@\(.*\)>/\1.\2/'`"



More information about the MPlayer-dev-eng mailing list