unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Jan Djärv" <jan.h.d@swipnet.se>
To: David Kastrup <dak@gnu.org>
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:01:03 +0100	[thread overview]
Message-ID: <460229AF.9000800@swipnet.se> (raw)
In-Reply-To: <857itanwvc.fsf@lola.goethe.zz>



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, I'd think the user locale 
would be a good choice.

> 
> It might be reasonable to add a new variable to hold the system locale
> which should not depend on the user locale.  However, it is somewhat
> late for this.  Clearly, assuming emacs-mule encoding for the system,
> as it now appears the case, is always wrong.
> 
> For current systems, assuming utf-8 will likely be correct most of the
> time, at least.

UTF-8 is much better than emacs-mule.  If it is not too much work, I'd suggest 
checking if the name is valid UTF-8, and if it isn't, use the user locale.

	Jan D.

  parent reply	other threads:[~2007-03-22  7:01 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 [this message]
2007-03-22  7:40       ` David Kastrup
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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=460229AF.9000800@swipnet.se \
    --to=jan.h.d@swipnet.se \
    --cc=dak@gnu.org \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).