X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Futf-2000%2Fread-maps.el;h=a7643150ed6054a21c40bed76eb7b4cb394972af;hb=4812b9cdfa83ae4465a337a5cc832ac12978c893;hp=cef08e3b16f2e8652f57104d10f2e02d7a000277;hpb=8c7c7cec033127b9928e2d6dec42afbfd34da848;p=chise%2Fxemacs-chise.git.1 diff --git a/lisp/utf-2000/read-maps.el b/lisp/utf-2000/read-maps.el index cef08e3..a764315 100644 --- a/lisp/utf-2000/read-maps.el +++ b/lisp/utf-2000/read-maps.el @@ -1,6 +1,6 @@ ;;; read-maps.el --- Read mapping-tables. -;; Copyright (C) 2002,2003 MORIOKA Tomohiko +;; Copyright (C) 2002,2003,2004 MORIOKA Tomohiko ;; Author: MORIOKA Tomohiko ;; Keywords: mapping table, character, CCS, multiscript, multilingual @@ -59,7 +59,7 @@ (setq ccs '=jis-x0213-2-2000 code (string-to-int (match-string 1) 16) ucs-pat "\tJU[+-]\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]+\\)" - ucs-ccs 'ucs-jis) + ucs-ccs '=ucs@jis-2000) (goto-char (match-end 0)) ) ((looking-at "^C1-\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\\)") @@ -132,7 +132,10 @@ (when (and ucs (not (eq (or (encode-char chr '=ucs 'defined-only) (and (not (memq ucs-ccs '(ucs-jis - =ucs-jis-1990))) + =ucs-jis-1990 + =ucs-jis-2000 + ;; ucs-big5 + ))) (get-char-attribute chr '=>ucs))) ucs))) (if (or ucs-code (null ucs-ccs)) @@ -142,6 +145,34 @@ (put-char-attribute chr ucs-ccs ucs))))) (forward-line))))) +(defun jp-jouyou-read-file (filename) + (interactive "fjp-jouyou file : ") + (with-temp-buffer + (buffer-disable-undo) + (insert-file-contents filename) + (goto-char (point-min)) + (let (char tchars) + (while (re-search-forward "^[^\t\n ]+\t\\(.\\)\t*" nil t) + (setq char (aref (match-string 1) 0) + tchars (buffer-substring (match-end 0) + (point-at-eol))) + (when (> (length tchars) 0) + (setq tchars + (mapcar (lambda (c) + (aref c 0)) + (split-string tchars " "))) + (put-char-attribute char + '<-simplified@JP/Jouyou + tchars)) + ;; (put-char-attribute + ;; char 'script (adjoin + ;; 'JP + ;; (adjoin + ;; 'Jouyou + ;; (adjoin + ;; 'Ideograph + ;; (get-char-attribute char 'script))))) + )))) (provide 'read-maps)