[MPlayer-dev-eng] locale in GUI

Hans-Dieter Kosch hdkosch at kabelbw.de
Sun Mar 10 20:50:41 CET 2013


Reimar Döffinger wrote:
> On 10 Mar 2013, at 20:24, Hans-Dieter Kosch <hdkosch at kabelbw.de> wrote:
>>
>> old_locale = setlocale(LC_ALL, NULL);
>> setlocale(LC_ALL, "");
>> g_filename_to_utf8(...);
>> setlocale(LC_ALL, old_locale);
>>
>> Bad hack, admittedly.
> 
> No, broken. setlocale affects all threads. It might result in for example HTTP requests made by the cache (if run in thread instead of separate process) randomly generating wrong requests.
> A debugging nightmare.

Yes, I know about this thread awareness, so what can we do? Some kind of locking 
(I had bad experience with such things in the past)?


More information about the MPlayer-dev-eng mailing list