unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Kenichi Handa <handa@m17n.org>
Cc: emacs-devel@gnu.org
Subject: Re: Feature request: multibyte user-full-name
Date: Tue, 14 Mar 2006 10:48:15 +0900	[thread overview]
Message-ID: <E1FIydz-0007Jb-00@etlken> (raw)
In-Reply-To: <m2acbwm7xd.wl%shinra@j10n.org> (message from AIDA Shinra on Sun,  12 Mar 2006 16:35:58 +0900)

In article <m2acbwm7xd.wl%shinra@j10n.org>, AIDA Shinra <shinra@j10n.org> writes:

> Hello,
> user-full-name might contain non-ASCII characters. For example,
> pw_gecos is encoded in UTF-8 on Darwin.

> No technical problems exist except in which coding system should Emacs
> decode the username. We have three options:

> 1. Introduce something like directory-system-coding-system and guess
> it in set-locale-environment.

> 2. Apply file-name-coding-system and pray that it works.

> 3. Hardcode for each platform.

Why do you think that pw_gecos is related to something like
directory or file name?

Anyway, as far as a system allows users to switch locale, I
think, pw_gecos must adopt locale-independent encoding, thus
the possible encoding is one of UTF-*.  And, considering
backward compatibility, it should be UTF-8.  Then, how about
we always decode it by utf-8 (only if it contains a byte
with MSB set) while falling back to locale-coding-system
(invalid utf-8 sequence is found), and see if that works on
any systems?   How does GNU/Linux encode it?

By the way, does the mis-decoding of user-full-name lead to
any serious error?

---
Kenichi Handa
handa@m17n.org

  reply	other threads:[~2006-03-14  1:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-12  7:35 Feature request: multibyte user-full-name AIDA Shinra
2006-03-14  1:48 ` Kenichi Handa [this message]
2006-03-14  3:18   ` AIDA Shinra
2006-03-14  4:54     ` Zhang Wei
2006-03-14  6:22       ` Miles Bader
2006-03-14  5:44     ` Kenichi Handa
2006-03-14 16:17       ` AIDA Shinra
2006-03-14 16:07     ` Stefan Monnier
2006-03-20  4:47       ` Kenichi Handa
2006-03-14 22:36     ` Stefan Monnier
2006-03-15  7:46       ` Jan D.
2006-03-19  6:12         ` AIDA Shinra

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=E1FIydz-0007Jb-00@etlken \
    --to=handa@m17n.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).