(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)))))