From: Mario Lang <mlang@delysid.org>
To: emacs-devel@gnu.org
Cc: simon@familiekainz.at
Subject: report_file_errno downcases non-english text incorrectly
Date: Tue, 20 Jan 2015 15:26:16 +0100 [thread overview]
Message-ID: <8761c1wmt3.fsf@fx.delysid.org> (raw)
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,
⡍⠁⠗⠊⠕
next reply other threads:[~2015-01-20 14:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-20 14:26 Mario Lang [this message]
2015-01-20 16:04 ` report_file_errno downcases non-english text incorrectly Paul Eggert
2015-01-20 17:26 ` Stefan Monnier
2015-01-20 22:31 ` Paul Eggert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8761c1wmt3.fsf@fx.delysid.org \
--to=mlang@delysid.org \
--cc=emacs-devel@gnu.org \
--cc=simon@familiekainz.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).