qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] gtk: use setlocale() for LC_MESSAGES only


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH] gtk: use setlocale() for LC_MESSAGES only
Date: Fri, 18 Dec 2015 20:55:15 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Alberto Garcia <address@hidden> writes:

>>> > We do however have translations for a few simple strings for the GTK+
>>> > menu items, so in order to run QEMU using the C locale, and yet have a
>>> > translated UI let's use setlocale() for LC_MESSAGES only.
>>> > 
>>> Not sure why I noticed it only now and if it's related to any recent
>>> package upgrade on my side (using RHEL 7), but I noticed that
>>> non-ASCII characters in the GTK UI strings are broken for me and git
>>> bisect pointed to this commit.
>>
>> I guess we need to set LC_CTYPE too.
>
> That affects functions in ctype.h (isalpha(), islower(), isupper(), ...)
> I guess that's safe?

If we're guessing, then I guess it isn't.  But we shouldn't be guessing.

"LC_CTYPE affects the behavior of the character handling functions and
the multibyte and wide character functions."

I doubt there's much use for the latter in QEMU itself, but in
libraries, all bets are off.  I guess this is what actually screws up
GTK.

We do use the former.  LC_CTYPE set to some sufficiently funky locale is
bound to upset these uses.

In short: nope, we can't just set LC_CTYPE, at least not without further
analysis.

We should've stayed out of the GUI business.

[...]



reply via email to

[Prev in Thread] Current Thread [Next in Thread]