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

Re: encoding of /etc/passwd



Behdad Esfahbod wrote:


Excuse me, what a mess that would create! How would you know which encoding /etc/passwd is in? What if you have both Japanese and Russian users on your system? UTF-8 is the only candidate. You can use iconv to convert user's input to UTF-8.


I told you... it has to be in the *system default* character
set/locale.  In practice, UTF-8 is the only choice for multilingual
support, but there is a fair number of systems which currently use
ISO-8859-1.

What is the *system default character set/locale*? where is it defined?




Unfortunately it's different for each system, and it's an unbelievable mess. On most systems it happens to be whatever the "C" or "POSIX" locales are defined as (when it comes to charset, these locales can be anything as long as it includes the necessary characters; they are, of course, usually the same.) However, a small handful of systems actually export a different locale using environment variables.

-hpa



--
Linux-UTF8:   i18n of Linux on all levels
Archive:      http://mail.nl.linux.org/linux-utf8/