bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug in display-time-updates in "Chinese-GB" environment (patch included)


From: Lu Yong
Subject: Bug in display-time-updates in "Chinese-GB" environment (patch included)
Date: Tue, 23 Oct 2001 01:51:13 +0800
User-agent: Mutt/1.2i

In GNU Emacs 21.1.1 (i386-mingw-nt5.0.2195) 
 of 2001-10-22 on ODYSSEY
configured using `configure --with-gcc (2.95)'

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: CHS
  locale-coding-system: nil
  default-enable-multibyte-characters: t

When running on Windows 2000 (Simplified Chinese Version),
the string returned by display-time-string-forms is encoded
in 'chinese-iso-8bit, but it is not decoded correctly when called
in display-time-update.  The result is when user eval
  (display-time-mode t)
the date and time do not display correctly on the modeline.

The fix is simple -- just decoded with the first coding-system
found in the language environment.  But not sure whether it works
in other language environments.

---8<---*---8<---*------*--->8---*--->8---*---


*** time.el.orig        Thu Aug  9 22:52:02 2001
--- time.el     Tue Oct 23 01:44:08 2001
***************
*** 250,256 ****
                ("Sep" . "9") ("Oct" . "10") ("Nov" . "11") ("Dec" . "12")))))
           (dayname (substring time 0 3)))
      (setq display-time-string
!           (mapconcat 'eval display-time-string-forms ""))
      ;; This is inside the let binding, but we are not going to document
      ;; what variables are available.
      (run-hooks 'display-time-hook))
--- 250,259 ----
                ("Sep" . "9") ("Oct" . "10") ("Nov" . "11") ("Dec" . "12")))))
           (dayname (substring time 0 3)))
      (setq display-time-string
!           (decode-coding-string (mapconcat 'eval display-time-string-forms "")
!                               (car (get-language-info
!                                     current-language-environment
!                                     'coding-system))))
      ;; This is inside the let binding, but we are not going to document
      ;; what variables are available.
      (run-hooks 'display-time-hook))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]