From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: getpwent, user-full-name and utf-8 Date: Wed, 21 Mar 2007 10:58:08 +0100 Message-ID: <86zm66q5ov.fsf@lola.quinscape.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1174471108 14558 80.91.229.12 (21 Mar 2007 09:58:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 21 Mar 2007 09:58:28 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 21 10:58:21 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 1HTxaG-0006EM-Aq for ged-emacs-devel@m.gmane.org; Wed, 21 Mar 2007 10:58:20 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HTxbv-00067r-5J for ged-emacs-devel@m.gmane.org; Wed, 21 Mar 2007 05:00:03 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HTxbp-00062d-6W for emacs-devel@gnu.org; Wed, 21 Mar 2007 05:59:57 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HTxbn-0005yc-AX for emacs-devel@gnu.org; Wed, 21 Mar 2007 05:59:56 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HTxbm-0005yT-Vi for emacs-devel@gnu.org; Wed, 21 Mar 2007 04:59:55 -0500 Original-Received: from pc3.berlin.powerweb.de ([62.67.228.11]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HTxa7-0002AO-3L for emacs-devel@gnu.org; Wed, 21 Mar 2007 05:58:11 -0400 Original-Received: from quinscape.de (pd95b0fdb.dip0.t-ipconnect.de [217.91.15.219]) by pc3.berlin.powerweb.de (8.9.3p3/8.9.3) with ESMTP id KAA22089 for ; Wed, 21 Mar 2007 10:58:07 +0100 X-Delivered-To: Original-Received: (qmail 21971 invoked from network); 21 Mar 2007 09:58:08 -0000 Original-Received: from unknown (HELO lola.quinscape.zz) ([10.0.3.43]) (envelope-sender ) by ns.quinscape.de (qmail-ldap-1.03) with SMTP for ; 21 Mar 2007 09:58:08 -0000 Original-Received: by lola.quinscape.zz (Postfix, from userid 1001) id 4BF9EC1BA2; Wed, 21 Mar 2007 10:58:08 +0100 (CET) User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-detected-kernel: Linux 2.4-2.6 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:68206 Archived-At: Hi, user-full-name is set using getpwentry without decoding the resulting byte string at all. The manual page of getpwent does not mention any encoding of /etc/passwd, neither does that of /etc/passwd. It is a safe bet, however, that /etc/passwd is not encoded in emacs-mule. Since different users may use different language environments, I propose that we decode the results from getpwent according to utf-8. There will likely be similar problems with other system functions (name server lookup?). emacs-mule certainly is not the right answer to the encoding problem. And the problem will persist with emacs-unicode2 as well since there is a difference between illegal byte sequences and decoded illegal byte sequences. I propose that we bite the bullet, assume a fixed external system encoding of utf-8 for such strings, and recode accordingly. -- David Kastrup