all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* report_file_errno downcases non-english text incorrectly
@ 2015-01-20 14:26 Mario Lang
  2015-01-20 16:04 ` Paul Eggert
  0 siblings, 1 reply; 4+ messages in thread
From: Mario Lang @ 2015-01-20 14:26 UTC (permalink / raw
  To: emacs-devel; +Cc: simon

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,
  ⡍⠁⠗⠊⠕



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-01-20 22:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-20 14:26 report_file_errno downcases non-english text incorrectly Mario Lang
2015-01-20 16:04 ` Paul Eggert
2015-01-20 17:26   ` Stefan Monnier
2015-01-20 22:31     ` Paul Eggert

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.