Keith Packard <[EMAIL PROTECTED]> writes:

> Around 14 o'clock on Jul 8, Owen Taylor wrote:
> 
> > +    locale = (FcChar8 *)setlocale (LC_CTYPE, NULL);
> 
> Don't you mean LC_MESSAGES?  If so, I think we should be able to use this 
> return value almost raw; stripping out the language and territory codes and
> passing them in as FC_LANG, right?

Interesting question... My opinion is that LC_CTYPE is right... if
someone does something like:

 LANG=ja_JP.UTF-8 LC_MESSAGES=en_US.UTF-8 

They typically mean "I want to process Japanese text, but show me
messages in English." 

We should then be picking fonts that work well for Japanese.

It's very seldom that anybody would have a LC_MESSAGES value that
wasn't displayable in their LC_CTYPE; that would be nonsensical...

LC_CTYPE is defined by POSIX to specify "Character classification and
case conversion", while LC_MESSAGES is "Formats of informative and
diagnostic messages and interactive responses." Neither is an exact
match here, but I'd argue that the typical use of mixed locales 
makes LC_CTYPE more useful.

> (no case conversion is necessary, FC_LANG comparisons are already case 
> insensitive).

This is code taken from GTK+ ... case conversions were mostly for
elegance, so that the form returned by get_default_lang() matched the
canonical form of the Pango language tags.

Regards,
                                        Owen
_______________________________________________
I18n mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/i18n

Reply via email to