From: tomo Date: Wed, 25 May 2005 04:33:12 +0000 (+0000) Subject: (www-ids-find-format-line): Display glyphs of JIS X0208, 0212, GB2312, X-Git-Tag: chise-core-0_22~6 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=4f4d92dcba16aa1907371b793c3c8194a5eebbf8;p=chise%2Fids.git (www-ids-find-format-line): Display glyphs of JIS X0208, 0212, GB2312, 12345 and CNS 11643. (www-batch-ids-find): Add settings for `coded-charset-entity-reference-alist' to prefer CCSs that can be displayed. --- diff --git a/www/www-ids-find.el b/www/www-ids-find.el index 5b43c9c..5446d1f 100644 --- a/www/www-ids-find.el +++ b/www/www-ids-find.el @@ -20,7 +20,7 @@ (defun www-ids-find-format-line (c is) (let ((str (encode-coding-string (format "%c" c) 'utf-8-er)) - code ucs) + plane code ucs) (princ (with-temp-buffer (cond @@ -40,6 +40,37 @@ code code)) (insert (format "JC3-%04X" code)) ) + ((string-match "&J\\(78\\|83\\|90\\|SP\\)-\\([0-9A-F]+\\);" str) + (setq plane (match-string 1 str) + code (string-to-int (match-string 2 str) 16)) + (insert "\"J%s-%04X\"\n" + plane code plane + (- (lsh code -8) 32) + (- (logand code 255) 32))) + (insert (format "J%s-%04X" plane code)) + ) + ((string-match "&G\\([01]\\)-\\([0-9A-F]+\\);" str) + (setq plane (string-to-int (match-string 1 str)) + code (string-to-int (match-string 2 str) 16)) + (insert "\"G%d-%04X\"\n" + plane code plane + (- (lsh code -8) 32) + (- (logand code 255) 32))) + (insert (format "G%d-%04X" plane code)) + ) + ((string-match "&C\\([1-7]\\)-\\([0-9A-F]+\\);" str) + (setq plane (string-to-int (match-string 1 str)) + code (string-to-int (match-string 2 str) 16)) + (insert "\"C%d-%04X\"\n" + plane code plane code)) + (insert (format "C%d-%04X" plane code)) + ) (t (insert "