On Tue, Jun 07, 2005 at 10:30:16PM +0200, I wrote:
> Now compare
>   $ env - LANG=ja_JP LANGUAGE=de_DE cat -h
>   cat: Ung��ltige Option -- h
>   ,,cat --help�� gibt weitere Informationen.
>   $ env - LANG=fr_FR LANGUAGE=de_DE cat -h
>   cat: Ung�ltige Option -- h
>   ,,cat --help" gibt weitere Informationen.
> The latter works as expected, but the former does not because of encoding
> mismatch.  In order to avoid such problems, LANGUAGE variable should almost
> be set under UTF-8 locales only.  You can check that the some command
> with LANG=ja_JP.UTF-8 works fine.

Note also that this output may differ from LANG=de_DE.  E.g. on my
system, de_DE is patched to fix #235759, thus I get
  $ env - LANG=de_DE cat -h
  cat: Ung�ltige Option -- h
  �cat --help� gibt weitere Informationen.
(The difference is in quotes on the last line)
In this case, LC_CTYPE=de_DE whereas "LANG=fr_FR LANGUAGE=de_DE" implies
LC_CTYPE=fr_FR and transliteration is different.  This is another reason
why (IMO) LANGUAGE should be used with UTF-8 locales in order to avoid
such strange side effects.

Denis

Reply via email to