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

* Re: report_file_errno downcases non-english text incorrectly
  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
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Eggert @ 2015-01-20 16:04 UTC (permalink / raw)
  To: Mario Lang, emacs-devel; +Cc: simon

Mario Lang wrote:
> Does anyone have a suggestion if we can improve on this?

I do.  Let's stop downcasing.  There's no good reason to second-guess the system 
here.



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

* Re: report_file_errno downcases non-english text incorrectly
  2015-01-20 16:04 ` Paul Eggert
@ 2015-01-20 17:26   ` Stefan Monnier
  2015-01-20 22:31     ` Paul Eggert
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2015-01-20 17:26 UTC (permalink / raw)
  To: Paul Eggert; +Cc: Mario Lang, simon, emacs-devel

>> Does anyone have a suggestion if we can improve on this?
> I do.  Let's stop downcasing.  There's no good reason to second-guess the
> system here.

Agreed,


        Stefan



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

* Re: report_file_errno downcases non-english text incorrectly
  2015-01-20 17:26   ` Stefan Monnier
@ 2015-01-20 22:31     ` Paul Eggert
  0 siblings, 0 replies; 4+ messages in thread
From: Paul Eggert @ 2015-01-20 22:31 UTC (permalink / raw)
  To: Mario Lang; +Cc: simon, emacs-devel

I filed a bug report, with a patch, here:

http://bugs.gnu.org/19642

I plan to install the patch unless there are objections.



^ 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.