* [PATCH] Incorrect message in hanja-list-show()
@ 2008-06-24 2:32 Jihyun Cho
2008-06-24 8:58 ` Jason Rumney
0 siblings, 1 reply; 3+ messages in thread
From: Jihyun Cho @ 2008-06-24 2:32 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 198 bytes --]
When the coding system is not UTF-8, the message of 'hanja-list-show'
does not look right.
This problem occurs in most of the the Korean Windows.
The patch is decoding from encoded string by UTF-8.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: emacs-hanja-list-decoding.diff --]
[-- Type: text/x-diff; name=emacs-hanja-list-decoding.diff, Size: 1355 bytes --]
? emacs-hanja-list-decoding.diff
Index: emacs/lisp/language/hanja-util.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/language/hanja-util.el,v
retrieving revision 1.5
diff -u -8 -p -r1.5 hanja-util.el
--- emacs/lisp/language/hanja-util.el 9 Jun 2008 01:18:11 -0000 1.5
+++ emacs/lisp/language/hanja-util.el 23 Jun 2008 16:48:15 -0000
@@ -6541,17 +6541,21 @@ character. This variable is initialized
(put-text-property
(+ 2 (string-match (format "%d\\.[^ ]*" idx) msg))
(match-end 0)
'face 'highlight msg)
(setq char-meaning (cdr (car partial-hanja-list))))
(setq idx (1+ idx)
partial-hanja-list (cdr partial-hanja-list)))
(if char-meaning
- (setq msg (format "%s (뜻 : %s)" msg char-meaning)))
+ (setq msg
+ (format "%s (%s : %s)"
+ msg
+ (decode-coding-string "뜻" 'utf-8)
+ (decode-coding-string char-meaning 'utf-8))))
(message "%s" msg)))
(defun hanja-list-terminate ()
"Exit from the hanja listing mode with the currently selected character."
(let ((base (aref hanja-conversions 0))
(offset (aref hanja-conversions 1))
(hanja-list (aref hanja-conversions 2)))
(throw 'exit-input-loop
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-06-24 16:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-24 2:32 [PATCH] Incorrect message in hanja-list-show() Jihyun Cho
2008-06-24 8:58 ` Jason Rumney
2008-06-24 16:35 ` Jihyun Cho
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).