From 6c0969cade7c54a5caa7763a8763babebd8ce112 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Wed, 27 Aug 2008 01:11:41 +0000 Subject: [PATCH] (report_file_error): Fix handling of multibyte error string. --- src/ChangeLog | 5 +++++ src/fileio.c | 10 ++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index c7bda92493a..259bc7f04ed 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2008-08-27 Kenichi Handa + + * fileio.c (report_file_error): Fix handling of multibyte error + string. + 2008-08-27 Andreas Seltenreich * xterm.c (x_term_init): Temporarily hide the partially diff --git a/src/fileio.c b/src/fileio.c index d289f426eb1..8eb1b3a2c87 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -261,8 +261,14 @@ report_file_error (string, data) default: /* System error messages are capitalized. Downcase the initial unless it is followed by a slash. */ - if (SREF (errstring, 1) != '/') - SSET (errstring, 0, DOWNCASE (SREF (errstring, 0))); + if (! EQ (Faref (errstring, make_number (1)), make_number ('/'))) + { + int c; + + str = (char *) SDATA (errstring); + c = STRING_CHAR (str, 0); + Faset (errstring, 0, make_number (DOWNCASE (c))); + } xsignal (Qfile_error, Fcons (build_string (string), Fcons (errstring, data))); -- 2.39.5