From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Zhang Wei Newsgroups: gmane.emacs.devel Subject: Re: Feature request: multibyte user-full-name Date: Tue, 14 Mar 2006 12:54:53 +0800 Message-ID: <87pskppqw2.fsf@emacsfans.org> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1875061107==" X-Trace: sea.gmane.org 1142312056 12060 80.91.229.2 (14 Mar 2006 04:54:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 14 Mar 2006 04:54:16 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 14 05:54:12 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 1FJ1Xt-00020K-Mz for ged-emacs-devel@m.gmane.org; Tue, 14 Mar 2006 05:54:10 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FJ1Xt-0006yO-30 for ged-emacs-devel@m.gmane.org; Mon, 13 Mar 2006 23:54:09 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FJ1Xf-0006yD-Bz for emacs-devel@gnu.org; Mon, 13 Mar 2006 23:53:55 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FJ1Xb-0006xp-Dr for emacs-devel@gnu.org; Mon, 13 Mar 2006 23:53:54 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FJ1Xb-0006xl-3q for emacs-devel@gnu.org; Mon, 13 Mar 2006 23:53:51 -0500 Original-Received: from [64.233.162.205] (helo=zproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FJ1bi-0002Jc-LL for emacs-devel@gnu.org; Mon, 13 Mar 2006 23:58:06 -0500 Original-Received: by zproxy.gmail.com with SMTP id v1so75287nzb for ; Mon, 13 Mar 2006 20:53:50 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:to:subject:references:from:mail-followup-to:date:in-reply-to:message-id:user-agent:mime-version:content-type; b=eDNlPps6iC+Ff9XB2Cw56Iv4tGmE2FuiAdGJDaUL2yMUHZN0ca5rAJ5w5mX1IreBBTbm0SRdaMqU9ivb4/daIxviHxDACwlbcE0wjLOc0cHZDOWTjdNMGqEem2xWu3hwqVOZ8yI5COKAHo8sORGaPMB1auoQQ7gRZXgYV43WlGU= Original-Received: by 10.36.84.7 with SMTP id h7mr4309108nzb; Mon, 13 Mar 2006 20:53:49 -0800 (PST) Original-Received: from emacsfans.org ( [59.66.78.64]) by mx.gmail.com with ESMTP id c1sm1093705nzd.2006.03.13.20.53.46; Mon, 13 Mar 2006 20:53:49 -0800 (PST) Original-Received: from brep by emacsfans.org with local (Exim 4.60) (envelope-from ) id 1FJ1Yf-0002Nh-51 for emacs-devel@gnu.org; Tue, 14 Mar 2006 12:54:57 +0800 Original-To: emacs-devel@gnu.org Mail-Followup-To: emacs-devel@gnu.org In-Reply-To: (AIDA Shinra's message of "Tue, 14 Mar 2006 12:18:14 +0900") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:51591 Archived-At: --===============1875061107== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" --=-=-= Content-Transfer-Encoding: quoted-printable AIDA Shinra writes: >> 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? > > A site administrator might choose an encoding other than UTF-8 even if > it is locale-dependent... Encoding is a *big* problem is the world of GNU/Linux, mainly comes From=20the lack of standard.=20 For example, if two users select different locale in the same GNU/Linux system, userA select zh_CN.GB2312, userB select zh_CN.UTF-8, because all of the filename related system call write/read filename *as is*, that means userA's filename is encoded by GB2312, userB's filename is encoded by UTF-8, that result in they can't read eath other's filename, one's filename is a completely mess to the other. Internet makes this problem even worse considering no standard encoding is used for information exchange, ssh, ftp, vnc ..., almost every of them will encounter encoding problem everyday. Perhaps the ultimate best solution to this problem is, at the system call level, filename is converted to utf-8 no matter what ever the locale a user choose. If it is hard to do in the kernel, at least we should do it at the libc level. =2D-=20 GnuPG KeyID: 0x61C92BB9 --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQFEFkyhPKSCSWHJK7kRAmBmAJ90DfMZ+WGGJB9V5lqt2t2vtjzc0gCfXtOW yOUFrmnxsWcZ62vHqPPJowQ= =YrLJ -----END PGP SIGNATURE----- --=-=-=-- --===============1875061107== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --===============1875061107==--