From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: Feature request: multibyte user-full-name Date: Tue, 14 Mar 2006 10:48:15 +0900 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1142360613 13481 80.91.229.2 (14 Mar 2006 18:23:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 14 Mar 2006 18:23:33 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 14 19:23:24 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FJE4d-0005Oy-I1 for ged-emacs-devel@m.gmane.org; Tue, 14 Mar 2006 19:16:48 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FJE4c-0003Mo-Um for ged-emacs-devel@m.gmane.org; Tue, 14 Mar 2006 13:16:46 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FIyeC-00061M-Vw for emacs-devel@gnu.org; Mon, 13 Mar 2006 20:48:29 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FIye9-000611-Bm for emacs-devel@gnu.org; Mon, 13 Mar 2006 20:48:28 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FIye9-00060y-54 for emacs-devel@gnu.org; Mon, 13 Mar 2006 20:48:25 -0500 Original-Received: from [192.47.44.130] (helo=tsukuba.m17n.org) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FIyiD-0006od-Sq for emacs-devel@gnu.org; Mon, 13 Mar 2006 20:52:38 -0500 Original-Received: from nfs.m17n.org (nfs.m17n.org [192.47.44.7]) by tsukuba.m17n.org (8.13.4/8.13.4/Debian-3) with ESMTP id k2E1mGkg012200; Tue, 14 Mar 2006 10:48:16 +0900 Original-Received: from etlken (etlken.m17n.org [192.47.44.125]) by nfs.m17n.org (8.13.4/8.13.4/Debian-3) with ESMTP id k2E1mGY6015804; Tue, 14 Mar 2006 10:48:16 +0900 Original-Received: from handa by etlken with local (Exim 3.36 #1 (Debian)) id 1FIydz-0007Jb-00; Tue, 14 Mar 2006 10:48:15 +0900 Original-To: AIDA Shinra In-reply-to: (message from AIDA Shinra on Sun, 12 Mar 2006 16:35:58 +0900) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/22.0.50 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:51619 Archived-At: In article , AIDA Shinra 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