unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* tmm.el: non-ASCII characters with locale-coding-system
@ 2008-04-16 13:09 Tatsuya Kinoshita
  2008-04-16 15:38 ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Tatsuya Kinoshita @ 2008-04-16 13:09 UTC (permalink / raw)
  To: emacs-devel; +Cc: nori1, czkmt

Hi Emacs developers,

Could you please consider applying the following patch to handle
non-ASCII characters with locale-coding-system for tmm.el?

----
--- tmm.el.orig	2008-02-08 22:47:00.000000000 +0900
+++ tmm.el	2008-03-14 08:08:04.000000000 +0900
@@ -171,7 +171,7 @@
     ;; The order of elements in tmm-km-list is the order of the menu bar.
     (mapc (lambda (elt)
 	    (if (stringp elt)
-		(setq gl-str elt)
+		(setq gl-str (decode-coding-string elt locale-coding-system))
 	      (and (listp elt) (tmm-get-keymap elt not-menu))))
 	    menu)
     ;; Choose an element of tmm-km-list; put it in choice.
@@ -282,6 +282,7 @@
 
 (defsubst tmm-add-one-shortcut (elt)
 ;; uses the free vars tmm-next-shortcut-digit and tmm-short-cuts
+  (setcar elt (decode-coding-string (car elt) locale-coding-system))
   (cond
    ((eq (cddr elt) 'ignore)
     (cons (concat " " (make-string (length tmm-mid-prompt) ?\-)
----

The patch is created by Tetsuo Tsukamoto (czkmt at remus.dti.ne.jp)
at http://mail.ring.gr.jp/skk/200803/msg00009.html to prevent a
problem of displaying Japanese characters with tmm.el reported
by Noritada Kobayashi at Debian BTS http://bugs.debian.org/470646.

To reproduce the problem,

* Install Daredevil SKK 13.1 (http://openlab.jp/skk/) and Emacs
  23.0.60 or 22.2.

* Run Emacs with `LC_ALL=ja_JP.UTF-8 emacs -q'.

* Type `M-x skk-mode RET', `M-`' and `s' to select the menu `s==>SKK',
  and then garbled characters (\351\240\230...) are displayed.

The patch works nicely on my system for Debian's ddskk 13.1-1,
emacs22 22.1+1-3 and Romain's emacs-snapshot 1:20080406-2.

Thanks,
-- 
Tatsuya Kinoshita




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

end of thread, other threads:[~2008-04-17 14:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-16 13:09 tmm.el: non-ASCII characters with locale-coding-system Tatsuya Kinoshita
2008-04-16 15:38 ` Stefan Monnier
2008-04-16 16:15   ` Tatsuya Kinoshita
2008-04-17 14:21     ` Tatsuya Kinoshita

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).