Subject: GTK+/GLib and i18n
To: None <current-users@netbsd.org>
From: cube <netbsd-current-users@quatriemek.com>
List: current-users
Date: 08/11/2002 23:08:19
Hi all,

I'm having trouble setting up a correct desktop with my 1.6E system.

It seems like GTK applications cannot handle the LANG parameter. For some
reason (a bad configuration file, seemingly), gdm associates ISO-8859-1
with language French, although it should be ISO8859-1. So when I start a
GNOME session, I get stuck with LANG set to fr_FR.ISO-8859-1 (even if I
export it otherwise in my .xsession).

With this setting, applications complain that the locale is not supported
by the C library, which seems perfectly normal, since the correct locale
would be fr_FR.ISO8859-1. But anyway French locales are loaded, but every
single string displayed by a GTK widget get truncated everywhere an
accentued letter (or any non-ASCII character) is encountered.

When I launch an application from a terminal with the correct LANG
setting, strings containing a non ASCII character get simply voided.

I thought this was a (not so) quite simple matter of how GTK+ and Glib are
compiled, and that maybe something was missing at configuration time for
those packages.

But things got weirder when I started gnometoaster to burn a cd. I started
it as root for obvious reasons. You couldn't imagine my surprise when I
realized strings were displayed correctly by GTK, with both settings for
LANG.

To get finer results, I started Galeon as root. The first-time-wizard
appeared quite weird. With LANG=ISO-8859-1, I get the usual warnings about
the locale in the terminal, but labels of options and other components of
the different dialog boxes are displayed correctly. But the title of the
pages get truncated at the first accentued letter.

Here is a screenshot of such a page, for those of you not using Galeon :
http://galeon.sourceforge.net/graphics/shots/druid/shot3.png

The title of the page is the white string at the top.

With LANG=ISO8859-1, still as root, I get exactly the opposite. The white
titles get displayed properly, but the labels of the widgets are voided
when they contain an accentued letter. Note that it is not the case with
gnometoaster.

So my question is, how do I get a correct display for a normal user, with
the correct locale ?

Thank you in advance for any help. Truncated strings are bearable, but I
like to understand why things don't go as they should.

cube

-- 
That's how I did it, Anton. I never saved anything
for the swim back.
Vincent/Jerome, in Gattaca.