[Top][All Lists]

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

Re: getpwent, user-full-name and utf-8

From: Miles Bader
Subject: Re: getpwent, user-full-name and utf-8
Date: Thu, 22 Mar 2007 11:30:16 +0900

David Kastrup <address@hidden> writes:
> Eli Zaretskii <address@hidden> writes:
>> I'd rather assume that usernames are encoded in the locale's
>> encoding, not necessarily in UTF-8.
> That assumes that every user operates under the same locale, and that
> this locale agrees with the locale of the system files.  In particular
> on multi-user machines, that is not realistic.
> For current systems, assuming utf-8 will likely be correct most of the
> time, at least.

Do you have any data to back that up?

If you think of multiuser systems versus single-user systems, I'd think:

  * On a single-user systems, the user's locale would often match

  * Multi-user systems tend to be much longer-lived (I think much of the
    data on the servers at my work dates back 15 years or more -- often
    the hardware gets upgraded, but the user-related data is just kept
    verbatim from the old system), and in many cases probably have user
    databases that predate widespread use of utf-8.  In europe I guess
    that would mean they use latin-XX.

There's really no way you can always get it right, but my intuition is
that the safest thing to do is use the locale as Eli suggests.

Of course you're right that emacs-mule is basically never
correct... (maybe there are some crazies out there though :-)


Is it true that nothing can be known?  If so how do we know this?  -Woody Allen

reply via email to

[Prev in Thread] Current Thread [Next in Thread]