[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
report_file_errno downcases non-english text incorrectly
From: |
Mario Lang |
Subject: |
report_file_errno downcases non-english text incorrectly |
Date: |
Tue, 20 Jan 2015 15:26:16 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
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 = SSDATA (errstring);
c = 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?
--
CYa,
⡍⠁⠗⠊⠕
- report_file_errno downcases non-english text incorrectly,
Mario Lang <=