Followup to:  <[EMAIL PROTECTED]>
By author:    Bruno Haible <[EMAIL PROTECTED]>
In newsgroup: linux.utf8
> 
> Obeying LANG is important in two scenarios:
> 
>   1) For the user who uses a single locale, and this locale's encoding
>      is not ISO-8859-1. He sets LANG in $HOME/.profile.
> 
>      Such a user will in the long run use non-ASCII filenames. They
>      will be stored in locale encoding on the disk. Programs should
>      be able to display and use such filenames.
> 
>   2) For the user who tries out a locale in a different encoding.
>      He sets LANG on the command line.
> 
>      Such a user will have to be prepared to problems with non-ASCII
>      filenames. But everything else should work without manual
>      intervention.
>            LANG=de_DE.UTF-8 xterm       -> get an UTF-8 xterm
>            LANG=ja_JP.EUC-JP gvim file  -> edit EUC-JP encoded file
>            LANG=vi_VN emacs             -> start emacs with Vietnamese
>                                            input method
>            etc.
> 
> It's for the second case that it is important that no encodings are
> stored in $HOME/.* files. And it's for the first case that non-ASCII
> filenames must be supported.
> 

Actually, the conditions for non-ASCII filenames is even stricter: for
the system to work consistently the way you describe, the ENTIRE
SYSTEM needs to use the same locale.  A user who sets a locale other
than the system standard locale (which may or may not be ISO-8859-1;
in fact, I claim the only sane default in the long run is UTF-8) and
then uses locale-specific encodings in the filesystem is going to be
fucked sooner or later.  Too many things will malfunction, be it
Samba or administrator/distribution-added files which is in the system
locale but not the locale expected by our (l)user.

FILENAME ENCODINGS IN DIFFERENT LOCALES DO NOT WORK.  PERIOD.

The reason is trivial: filename encoding is a systemwide property.
There is no possibility for adjusting filename encoding on a per-file
or per-user basis.  This is one, of many, mistakes the "locale" people
made when they set up their system.  It just doesn't work right.

        -hpa

-- 
<[EMAIL PROTECTED]> at work, <[EMAIL PROTECTED]> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt
-
Linux-UTF8:   i18n of Linux on all levels
Archive:      http://mail.nl.linux.org/linux-utf8/

Reply via email to