From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mario Lang Newsgroups: gmane.emacs.devel Subject: report_file_errno downcases non-english text incorrectly Date: Tue, 20 Jan 2015 15:26:16 +0100 Message-ID: <8761c1wmt3.fsf@fx.delysid.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1421764008 19231 80.91.229.3 (20 Jan 2015 14:26:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 20 Jan 2015 14:26:48 +0000 (UTC) Cc: simon@familiekainz.at To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 20 15:26:47 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YDZlX-0006wc-QT for ged-emacs-devel@m.gmane.org; Tue, 20 Jan 2015 15:26:47 +0100 Original-Received: from localhost ([::1]:43590 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YDZlW-0001hE-UP for ged-emacs-devel@m.gmane.org; Tue, 20 Jan 2015 09:26:46 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49718) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YDZlB-0001eZ-6y for emacs-devel@gnu.org; Tue, 20 Jan 2015 09:26:26 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YDZl6-0003Pw-9M for emacs-devel@gnu.org; Tue, 20 Jan 2015 09:26:25 -0500 Original-Received: from familiekainz.at ([91.121.101.210]:48229 helo=ks354034.kimsufi.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YDZl6-0003Pm-41 for emacs-devel@gnu.org; Tue, 20 Jan 2015 09:26:20 -0500 Original-Received: from fx.delysid.org (chello080109200215.3.sc-graz.chello.at [80.109.200.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ks354034.kimsufi.com (Postfix) with ESMTPSA id CC559BF53E; Tue, 20 Jan 2015 15:26:17 +0100 (CET) Original-Received: from mlang by fx.delysid.org with local (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1YDZl2-0001a1-Mu; Tue, 20 Jan 2015 15:26:16 +0100 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 91.121.101.210 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:181469 Archived-At: Hi. The logic in report_file_errno in src/fileio.c is subtle broken when it comes to foreign language errors: In particular, the german translation of "No such file or directory", which is "Datei oder Verzeichnis nicht gefunden" should *not* be downcased, because "Datei" always has to start with a capital letter, no matter where it is. So this logic, is lacking: /* System error messages are capitalized. Downcase the initial unless it is followed by a slash. (The slash case caters to error messages that begin with "I/O" or, in German, "E/A".) */ if (STRING_MULTIBYTE (errstring) && ! EQ (Faref (errstring, make_number (1)), make_number('/'))) { int c; str =3D SSDATA (errstring); c =3D STRING_CHAR ((unsigned char *) str); Faset (errstring, make_number (0), make_number (downcase (c))); } Does anyone have a suggestion if we can improve on this? --=20 CYa, =E2=A1=8D=E2=A0=81=E2=A0=97=E2=A0=8A=E2=A0=95