[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: format-time-string results invalid char with %a of Chinses Monday
From: |
Kenichi Handa |
Subject: |
Re: format-time-string results invalid char with %a of Chinses Monday |
Date: |
Wed, 06 Sep 2006 15:43:57 +0900 |
User-agent: |
SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/22.0.50 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI) |
In article <address@hidden>, Du Jingwu <address@hidden> writes:
> My system locale is zh_CN.GB18030 and I'm using GNU Emacs 23 CVS.
> An example saves thousand words:
> 1. (format-time-string "<%Y-%m-%d %a>" '(17539 62058 675709))
> The expected character is Chinese character of "one". But the result is a
> strange character like 'h'.
Thank you for the bug report. I've just installed the
attached fix in HEAD. That change will be propagated to
emacs-unicode-2 branch when Miles does synchronization next
time.
---
Kenichi Handa
address@hidden
Index: editfns.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/editfns.c,v
retrieving revision 1.425
retrieving revision 1.426
diff -u -r1.425 -r1.426
--- editfns.c 1 Sep 2006 13:28:13 -0000 1.425
+++ editfns.c 6 Sep 2006 06:40:52 -0000 1.426
@@ -1694,7 +1694,7 @@
SBYTES (format_string),
tm, ut);
if ((result > 0 && result < size) || (result == 0 && buf[0] == '\0'))
- return code_convert_string_norecord (make_string (buf, result),
+ return code_convert_string_norecord (make_unibyte_string (buf, result),
Vlocale_coding_system, 0);
/* If buffer was too small, make it bigger and try again. */