changeset 103432:c849cd055fab

(status_message): Fix previous change. Be sure to decode a localized string.
author Kenichi Handa <handa@m17n.org>
date Mon, 15 Jun 2009 13:20:53 +0000
parents f9ce528bce63
children be5fe3b3c1c2
files src/process.c
diffstat 1 files changed, 14 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/process.c	Mon Jun 15 10:50:09 2009 +0000
+++ b/src/process.c	Mon Jun 15 13:20:53 2009 +0000
@@ -464,15 +464,24 @@
   if (EQ (symbol, Qsignal) || EQ (symbol, Qstop))
     {
       char *signame;
-      int c;
       synchronize_system_messages_locale ();
       signame = strsignal (code);
       if (signame == 0)
-	signame = "unknown";
-      string = build_string (signame);
+	string = build_string ("unknown");
+      else
+	{
+	  int c1, c2;
+
+	  string = make_unibyte_string (signame, strlen (signame));
+	  if (! NILP (Vlocale_coding_system))
+	    string = (code_convert_string_norecord
+		      (string, Vlocale_coding_system, 0));
+	  c1 = STRING_CHAR ((char *) SDATA (string), 0);
+	  c2 = DOWNCASE (c1);
+	  if (c1 != c2)
+	    Faset (string, 0, make_number (c2));
+	}
       string2 = build_string (coredump ? " (core dumped)\n" : "\n");
-      c = STRING_CHAR ((char *) SDATA (string), 0);
-      Faset (string, 0, make_number (DOWNCASE (c)));
       return concat2 (string, string2);
     }
   else if (EQ (symbol, Qexit))