From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Jan_Dj=E4rv?= Newsgroups: gmane.emacs.devel Subject: Re: getpwent, user-full-name and utf-8 Date: Thu, 22 Mar 2007 08:01:03 +0100 Message-ID: <460229AF.9000800@swipnet.se> References: <86zm66q5ov.fsf@lola.quinscape.zz> <857itanwvc.fsf@lola.goethe.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1174546889 27380 80.91.229.12 (22 Mar 2007 07:01:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 22 Mar 2007 07:01:29 +0000 (UTC) Cc: Eli Zaretskii , emacs-devel@gnu.org To: David Kastrup Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 22 08:01:23 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HUHIY-0003xi-Jm for ged-emacs-devel@m.gmane.org; Thu, 22 Mar 2007 08:01:22 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HUHKJ-0007hI-EL for ged-emacs-devel@m.gmane.org; Thu, 22 Mar 2007 02:03:11 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HUHKF-0007d9-PU for emacs-devel@gnu.org; Thu, 22 Mar 2007 03:03:07 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HUHKE-0007Xd-41 for emacs-devel@gnu.org; Thu, 22 Mar 2007 03:03:07 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HUHKD-0007Wg-TW for emacs-devel@gnu.org; Thu, 22 Mar 2007 02:03:05 -0500 Original-Received: from mx20.gnu.org ([199.232.41.8]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HUHIP-0002Oq-2Z; Thu, 22 Mar 2007 03:01:13 -0400 Original-Received: from av9-1-sn3.vrr.skanova.net ([81.228.9.185]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HUHIO-0001XD-HX; Thu, 22 Mar 2007 03:01:12 -0400 Original-Received: by av9-1-sn3.vrr.skanova.net (Postfix, from userid 502) id 145FF3802B; Thu, 22 Mar 2007 08:01:06 +0100 (CET) Original-Received: from smtp3-1-sn3.vrr.skanova.net (smtp3-1-sn3.vrr.skanova.net [81.228.9.101]) by av9-1-sn3.vrr.skanova.net (Postfix) with ESMTP id CA8193847F; Thu, 22 Mar 2007 08:01:05 +0100 (CET) Original-Received: from husetbladh.homeip.net (81-235-205-78-no59.tbcn.telia.com [81.235.205.78]) by smtp3-1-sn3.vrr.skanova.net (Postfix) with ESMTP id B172037E42; Thu, 22 Mar 2007 08:01:05 +0100 (CET) User-Agent: Thunderbird 1.5.0.10 (X11/20070302) In-Reply-To: <857itanwvc.fsf@lola.goethe.zz> X-detected-kernel: Linux 2.4-2.6 X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) 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:68279 Archived-At: David Kastrup skrev: > Eli Zaretskii writes: > >>> From: David Kastrup >>> 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.