Re: gtkrc (fwd)



Kaixo!

On Sun, Oct 24, 1999 at 10:34:41PM -0400, Owen Taylor wrote:

>> Many years ago, we used zh_TW.BIG5 in a Taiwan and Big5 Encoding
>> Project. ( In fact, the solaris use zh_TW.BIG5 now )
>> 
>> We try to coordinate the FreeBSD team in Taiwan.
>> We agree to use zh_TW.Big5 now.
>> 
>> This is not a tech problem, so that maybe we should coordinate as soon as
>> possible.
> 
> GTK+ tries to work with any capitalization - whether LC_CTYPE
> is zh_TW.Big5 zh_TW.big5 or zh_TW.BIG5, it will always look
> for the file
> 
>   gtkrc.zh_CN.big5

You mean gtkrc.zh_TW.big5 ? :)

It's me that suggested to Owen to use a 'canonical' name when searching
for gtkrc files. That is important for Gnome/Gtk+ as they are multi-OS and
multi-platform projects. And the fact is that the encoding part of a locale
name is a real mess; the zh_TW.Big5 is one of the few that is more or less
standardized; but I bet that there are still some systems that use different
namings.
So, a much better solution imho, is to do what does the glibc itself:
convert the encoding string to all lowercase and suppress all 
non alphanumeric chars. That way you can have LANG=gtkrc.zh_TW.Big5 or
LANG=gtkrc.zh_TW.BIG-5 or gtkrc.zh_TW.b-Ig_5 or the like and they will all
match gtkrc.zh_TW.big5.

That isn't such a problem for Big5 encoding (but even for it I bet there are
systems where the problem can exist that they don't use 'Big5' by default),
but for almost all others there is the problem. So the 'canonicalization'
algorithm was necessary anyway.

In other words, Gtk+ follows the old good rule: "be large on what you accept,
be conservative on what you export". You can define your LANG and the like
varaibles as you best like it, and Gtk+ will found the proper file; and on
the other side there is no need to worry to know which name to give to
the gtkrc.* files; the same names will be used on all OS and platforms.

> I don't know exactly what the policy is for the glibc
> locale files. The code inside glibc checks for both
> the capitalzation given in the environment variable
> and the locale standardized the same way as in GTK+.

> Regards,
>                                         Owen

-- 
Ki ça vos våye bén,
Pablo Saratxaga

http://www.ping.be/~pin19314/		PGP Key available, key ID: 0x8F0E4975



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