X locale handling (was: Re: gtk+)

Paweł Sakowski pawel at sakowski.eu.org
Thu Sep 23 15:59:39 CEST 2004


On Thu, 2004-09-23 at 09:49 +0200, Andrzej Krzysztofowicz wrote:
> =?iso-8859-2?Q?Pawe=B3?= Sakowski wrote:
> > 
> > On Wed, 2004-09-22 at 21:57 +0200, Andrzej Krzysztofowicz wrote:
> > > One more doubt:
> > > I noticed that for some locales glibc encoding and Xlib encoding are
> > > different (eg. for et_EE, tt_RU, most *_IN, uz_UZ etc.).
> > > 
> > > Might it be a problem?
> > 
> > Not might. It is a problem. I've reported it at x.org quite some time
> > ago, no reply from them.
> 
> Do you have a testcase to show the problem?

I do, maybe not the shortest one:

- install qt built from -rHEAD (due to a bug in nl_langinfo usage,
earlier versions would also use an internal charset table)
- localedef -f UTF-8 -i pt_PT pt_PT (thus making pt_PT use UTF-8
according to glibc and ISO 8859-1 according to X)
- export LANG=pt_PT
- run an arbitrary qt program -- konqueror, rot13 from qt/examples,
whatever
- effect: you can't type any non-ASCII character

> Are there (IYO) any objections against syncing the locale.alias from X with
> the glibc encodings? Any new problems expected?

I don't expect any new problems, but neither will it fix the old one. It
might do the job for some typical cases (like et_EE you mentioned
earlier), but it won't sort out the test case above.

> But en_US.UTF-8/XLC_LOCALE does not refer to many fonts, possibly not being
> able to display characters in many languages (different kinds of cyrillic,
> devanagari, arabic, lao, armenian, georgian, etc.).
> I don't know what I can break adding more fsN/csN sections there.

I don't know how that works..

I was trying to do something else: to strip all cognition of charset out
of locale.alias and make X retrieve that information via
nl_langinfo(CODESET). The problem is that libX11 is a big chunk of
obscure code and it's pretty much undebuggable. Hopefully I'll stay
motivated for long enough to get sensible results.

-- 
+----------------------------------------------------------------------+
| Paweł Sakowski <pawel at sakowski.eu.org>            Never trust a man  |
|                            who can count up to 1023 on his fingers.  |
+----------------------------------------------------------------------+






More information about the pld-devel-en mailing list