From 3e474c74c3ca51085100d4277d0ab6b37d796812 Mon Sep 17 00:00:00 2001 From: tomo Date: Sat, 8 May 2004 15:24:24 +0000 Subject: [PATCH] (ids-dump-insert-big5-pua): New function. (ids-dump-big5-cdp): Use `ids-dump-insert-big5-pua'. --- ids-dump.el | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/ids-dump.el b/ids-dump.el index 03ada62..ea54637 100644 --- a/ids-dump.el +++ b/ids-dump.el @@ -201,6 +201,48 @@ (setq l (1+ l))) (setq h (1+ h))))) +(defun ids-dump-insert-big5-pua (ccs prefix) + (let ((line-spec (concat prefix "%04X\t%c\t%s\n")) + (h #x81) + l) + (while (<= h #xA0) + (setq l #x40) + (while (<= l #x7E) + (ids-dump-insert-line ccs line-spec (logior (lsh h 8) l)) + (setq l (1+ l))) + (setq l #xA1) + (while (<= l #xFE) + (ids-dump-insert-line ccs line-spec (logior (lsh h 8) l)) + (setq l (1+ l))) + (setq h (1+ h))) + (setq h #xC6) + (setq l #xDE) + (while (<= l #xFE) + (ids-dump-insert-line ccs line-spec (logior (lsh h 8) l)) + (setq l (1+ l))) + (setq h #xC7) + (while (<= h #xC8) + (setq l #x40) + (while (<= l #x7E) + (ids-dump-insert-line ccs line-spec (logior (lsh h 8) l)) + (setq l (1+ l))) + (setq l #xA1) + (while (<= l #xFE) + (ids-dump-insert-line ccs line-spec (logior (lsh h 8) l)) + (setq l (1+ l))) + (setq h (1+ h))) + (setq h #xFA) + (while (<= h #xFE) + (setq l #x40) + (while (<= l #x7E) + (ids-dump-insert-line ccs line-spec (logior (lsh h 8) l)) + (setq l (1+ l))) + (setq l #xA1) + (while (<= l #xFE) + (ids-dump-insert-line ccs line-spec (logior (lsh h 8) l)) + (setq l (1+ l))) + (setq h (1+ h))))) + (defun ids-dump-range (file path func &rest args) (with-temp-buffer (let* ((coding-system-for-write 'utf-8-mcs-er)) @@ -406,7 +448,7 @@ (defun ids-dump-big5-cdp (filename) (interactive "Fdump IDS-CDP : ") (ids-dump-range "IDS-CDP.txt" filename - #'ids-dump-insert-big5 + #'ids-dump-insert-big5-pua '=big5-cdp "CDP-")) -- 1.7.10.4