[MPlayer-dev-eng] locale in GUI
Hans-Dieter Kosch
hdkosch at kabelbw.de
Sun Mar 10 20:24:29 CET 2013
Hi Ingo,
thanks for the quick response.
Ingo Brückl wrote:
> Hans-Dieter Kosch wrote on Sun, 10 Mar 2013 19:24:37 +0100:
>
>> the function g_filename_to_utf8() used in the GUI (fileselect.c,
>> playlist.c) doesn't return a filename containing characters outside the
>> standard ASCII range.
>
> Please elaborate. I didn't notice any problems so far.
>
Just try a filename with german Umlauts, g_filename_to_utf8() returns NULL with
conversion error.
>> This is because setting the locale is disabled by gtk_disable_setlocale()
>> in gui/dialog/dialog.c (r22126) and thus glib works on the "C" locale. Does
>> anybody remember the reason?
>
> See
> http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2010-December/067107.html
>
I suspected such adversity...
What about that:
old_locale = setlocale(LC_ALL, NULL);
setlocale(LC_ALL, "");
g_filename_to_utf8(...);
setlocale(LC_ALL, old_locale);
Bad hack, admittedly.
Hans-Dieter
More information about the MPlayer-dev-eng
mailing list