From: tomo Date: Tue, 31 Jul 2001 04:55:01 +0000 (+0000) Subject: New file. X-Git-Tag: chise-base-0_23~140 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=228b6d8e9f977666c0487d4354450f81ca058d16;p=chise%2Ftomoyo-tools.git New file. --- 228b6d8e9f977666c0487d4354450f81ca058d16 diff --git a/check-mule.el b/check-mule.el new file mode 100644 index 0000000..d0ac0db --- /dev/null +++ b/check-mule.el @@ -0,0 +1,50 @@ +(with-current-buffer "arabic0.txt" + (goto-char (point-min)) + (let (code ucs chr ret) + (while (re-search-forward "^0x\\([0-9A-F]+\\)\t0x\\([0-9A-F]+\\)" nil t) + (setq code (string-to-int (match-string 1) 16) + ucs (string-to-int (match-string 2) 16)) + (setq chr (decode-char 'arabic-digit code)) + (if (or (setq ret (get-char-attribute chr 'ucs)) + (setq ret (get-char-attribute chr 'ucs-mule)) + (setq ret (get-char-attribute chr '=>ucs)) + (setq ret (get-char-attribute chr '->ucs))) + (unless (= ret ucs) + (put-char-attribute chr 'ucs-mule ucs) + ) + (put-char-attribute (decode-char 'ucs ucs) + 'arabic-digit code))))) + +(with-current-buffer "arabic1.txt" + (goto-char (point-min)) + (let (code ucs chr ret) + (while (re-search-forward "^0x\\([0-9A-F]+\\)\t0x\\([0-9A-F]+\\)" nil t) + (setq code (string-to-int (match-string 1) 16) + ucs (string-to-int (match-string 2) 16)) + (setq chr (decode-char 'arabic-1-column code)) + (if (or (setq ret (get-char-attribute chr 'ucs)) + (setq ret (get-char-attribute chr 'ucs-mule)) + (setq ret (get-char-attribute chr '=>ucs)) + (setq ret (get-char-attribute chr '->ucs))) + (unless (= ret ucs) + (put-char-attribute chr 'ucs-mule ucs) + ) + (put-char-attribute (decode-char 'ucs ucs) + 'arabic-1-column code))))) + +(with-current-buffer "arabic2.txt" + (goto-char (point-min)) + (let (code ucs chr ret) + (while (re-search-forward "^0x\\([0-9A-F]+\\)\t0x\\([0-9A-F]+\\)" nil t) + (setq code (string-to-int (match-string 1) 16) + ucs (string-to-int (match-string 2) 16)) + (setq chr (decode-char 'arabic-2-column code)) + (if (or (setq ret (get-char-attribute chr 'ucs)) + (setq ret (get-char-attribute chr 'ucs-mule)) + (setq ret (get-char-attribute chr '=>ucs)) + (setq ret (get-char-attribute chr '->ucs))) + (unless (= ret ucs) + (put-char-attribute chr 'ucs-mule ucs) + ) + (put-char-attribute (decode-char 'ucs ucs) + 'arabic-2-column code)))))