From: David Kastrup <dak@gnu.org>
To: "Jan Djärv" <jan.h.d@swipnet.se>
Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
Subject: Re: getpwent, user-full-name and utf-8
Date: Thu, 22 Mar 2007 08:40:07 +0100 [thread overview]
Message-ID: <86tzwdn2ug.fsf@lola.quinscape.zz> (raw)
In-Reply-To: <460229AF.9000800@swipnet.se> (Jan Djärv's message of "Thu\, 22 Mar 2007 08\:01\:03 +0100")
Jan Djärv <jan.h.d@swipnet.se> writes:
> David Kastrup skrev:
>> Eli Zaretskii <eliz@gnu.org> writes:
>>
>>>> From: David Kastrup <dak@gnu.org>
>>>> Date: Wed, 21 Mar 2007 10:58:08 +0100
>>>>
>>>> I propose that we bite the bullet, assume a fixed external system
>>>> encoding of utf-8 for such strings, and recode accordingly.
>>> 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.
>
> Since users themselves can set their full name,
Since when?
Well, I took a look at the manual page of passwd(1) on my GNU/Linux
system, and the description indeed says:
passwd also changes account information, such as the full
name of the user, the user's login shell, or his/her
password expiry date and interval.
Amusingly, however, there is no option for doing any of that except
the password related stuff.
There is, however,
CHFN(1) -- 06/06/2006 -- User Commands
NAME
chfn - change real user name and information
SYNOPSIS
chfn [-f full_name] [-r room_no] [-w work_ph] [-h home_ph]
[-o other] [user]
DESCRIPTION
chfn changes user fullname, office number, office extension,
and home phone number information for a user's account. This
information is typically printed by finger(1) and similar
programs. A normal user may only change the fields for her
own account, subject to the restrictions in
/etc/login.defs. (The default configuration is to prevent
users from changing their fullname.) The super user may
change any field for any account. Additionally, only the
super user may use the -o option to change the undefined
portions of the GECOS field.
The only restriction placed on the contents of the fields is
that no control characters may be present, nor any of comma,
colon, or equal sign. The other field does not have this
restriction, and is used to store accounting information
used by other applications.
So with the default settings, a user can't change his settings.
> I'd think the user locale would be a good choice.
It is not the worst choice, but I consider it likely that a better way
would be something like a separate "system locale". For lack of
better information, one could let it default to the user locale, but
it should be at least configurable separately.
Does anybody have access to the X/Open or Posix specs? Maybe
something is said about this in there.
--
David Kastrup
next prev parent reply other threads:[~2007-03-22 7:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-21 9:58 getpwent, user-full-name and utf-8 David Kastrup
2007-03-21 19:37 ` Eli Zaretskii
2007-03-21 20:51 ` David Kastrup
2007-03-22 2:30 ` Miles Bader
2007-03-22 7:01 ` Jan Djärv
2007-03-22 7:40 ` David Kastrup [this message]
2007-03-22 8:17 ` Jan Djärv
2007-03-22 9:06 ` Jan Djärv
2007-03-22 5:01 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86tzwdn2ug.fsf@lola.quinscape.zz \
--to=dak@gnu.org \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=jan.h.d@swipnet.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.