From 228b6d8e9f977666c0487d4354450f81ca058d16 Mon Sep 17 00:00:00 2001 From: tomo Date: Tue, 31 Jul 2001 04:55:01 +0000 Subject: [PATCH 1/1] New file. --- check-mule.el | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 check-mule.el 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))))) -- 1.7.10.4