1 ;; -*- coding: utf-8-mcs-er -*-
2 (require 'char-db-util)
3 (require 'chiset-common)
4 ;; (require 'concord-images)
6 (setq file-name-coding-system 'utf-8-mcs-er)
8 (concord-assign-genre 'code-point "/usr/local/var/chise-ipld/db")
9 (concord-assign-genre 'coded-character "/usr/local/var/chise-ipld/db")
10 (concord-assign-genre 'glyph "/usr/local/var/chise-ipld/db")
12 (concord-assign-genre 'image-resource "/usr/local/var/photo/db")
13 (concord-assign-genre 'glyph-image "/usr/local/var/photo/db")
15 (concord-assign-genre 'creator@ruimoku "/usr/local/var/ruimoku/db")
16 (concord-assign-genre 'person-name@ruimoku "/usr/local/var/ruimoku/db")
18 (concord-assign-genre 'journal-volume@ruimoku "/usr/local/var/ruimoku/db")
19 (concord-assign-genre 'article@ruimoku "/usr/local/var/ruimoku/db")
20 (concord-assign-genre 'book@ruimoku "/usr/local/var/ruimoku/db")
22 (concord-assign-genre 'classification@ruimoku "/usr/local/var/ruimoku/db")
23 (concord-assign-genre 'region@ruimoku "/usr/local/var/ruimoku/db")
24 (concord-assign-genre 'era@ruimoku "/usr/local/var/ruimoku/db")
25 (concord-assign-genre 'period@ruimoku "/usr/local/var/ruimoku/db")
26 (concord-assign-genre 'journal@ruimoku "/usr/local/var/ruimoku/db")
27 (concord-assign-genre 'journal-name@ruimoku "/usr/local/var/ruimoku/db")
28 (concord-assign-genre 'publisher@ruimoku "/usr/local/var/ruimoku/db")
29 (concord-assign-genre 'publisher-name@ruimoku "/usr/local/var/ruimoku/db")
31 (mount-char-attribute-table '*instance@ruimoku/bibliography/title)
32 ;; (mount-char-attribute-table '*instance@ruimoku/bibliography/content*note)
34 (concord-assign-genre 'entry@zh-classical "/usr/local/var/kanbun/db")
35 ;; (concord-assign-genre 'morpheme-entry@zh-classical "/usr/local/var/kanbun/db")
36 (concord-assign-genre 'word-class@zh-classical "/usr/local/var/kanbun/db")
37 (concord-assign-genre 'morpheme@zh-classical "/usr/local/var/kanbun/db")
38 (concord-assign-genre 'sentence@zh-classical "/usr/local/var/kanbun/db")
39 ;; (concord-assign-genre 'sentence-entry@zh-classical "/usr/local/var/kanbun/db")
41 (mount-char-attribute-table '*instance@morpheme-entry/zh-classical)
43 (concord-assign-genre 'ud@zh-classical "/usr/local/var/kanbun/db")
46 (concord-assign-genre 'hng-card "/usr/local/var/hng-card/db")
48 (mount-char-attribute-table '->HNG)
49 (mount-char-attribute-table '<-HNG)
50 (mount-char-attribute-table '->HNG@CN/manuscript)
51 (mount-char-attribute-table '<-HNG@CN/manuscript)
52 (mount-char-attribute-table '->HNG@CN/printed)
53 (mount-char-attribute-table '<-HNG@CN/printed)
54 (mount-char-attribute-table '->HNG@JP/manuscript)
55 (mount-char-attribute-table '<-HNG@JP/manuscript)
56 (mount-char-attribute-table '->HNG@JP/printed)
57 (mount-char-attribute-table '<-HNG@JP/printed)
58 (mount-char-attribute-table '->HNG@KR)
59 (mount-char-attribute-table '<-HNG@KR)
60 (mount-char-attribute-table '->HNG@MISC)
61 (mount-char-attribute-table '<-HNG@MISC)
63 (mount-char-attribute-table 'abstract-glyph@iwds-1)
64 (mount-char-attribute-table 'abstract-glyph@iwds-1/confluented)
67 (defvar est-hide-cgi-mode nil)
68 (defvar est-view-url-prefix "..")
69 (defvar chise-wiki-view-url "view.cgi")
70 (defvar chise-wiki-edit-url "edit.cgi")
72 (defvar chise-wiki-bitmap-glyphs-url
73 "http://www.chise.org/glyphs")
75 (defvar chise-wiki-hng-bitmap-glyphs-url
76 "http://hng.chise.org/glyphs/HNG")
78 (defvar chise-wiki-daijiten-bitmap-glyphs-url
79 "http://hng.chise.org/glyphs/daijiten")
81 (defvar chise-wiki-glyph-cgi-url
82 "http://www.chise.org/chisewiki/glyph.cgi")
84 (defvar chise-wiki-displayed-features nil)
86 (defvar est-coded-charset-priority-list
88 =cns11643-1 =cns11643-2 =cns11643-3
89 =cns11643-4 =cns11643-5 =cns11643-6 =cns11643-7
91 =jis-x0208 =jis-x0208@1990
96 =jis-x0213-1@2000 =jis-x0213-1@2004
97 =jis-x0208@1983 =jis-x0208@1978
98 =zinbun-oracle =>zinbun-oracle
102 =>>>jis-x0208 =>>>jis-x0213-1 =>>>jis-x0213-2
103 =>>jis-x0208 =>>jis-x0213-1 =>>jis-x0213-2
105 =+>jis-x0208 =+>jis-x0213-1 =+>jis-x0213-2
108 =>jis-x0208 =>jis-x0213-1
110 =>ucs@iso =>ucs@unicode
111 =>ucs@jis =>ucs@cns =>ucs@ks
112 =+>ucs@iso =+>ucs@unicode
113 =>>ucs@iso =>>ucs@unicode
114 =>>ucs@jis =>>ucs@cns =>>ucs@ks
115 =>>>ucs@iso =>>>ucs@unicode
116 =>>>ucs@jis =>>>ucs@cns =>>>ucs@ks
158 ===cns11643-1 ===cns11643-2 ===cns11643-3
159 ===cns11643-4 ===cns11643-5 ===cns11643-6 ===cns11643-7
162 (defun decode-uri-string (string &optional coding-system)
163 (if (> (length string) 0)
167 (mapconcat (lambda (char)
170 (char-to-string char)))
172 (while (string-match "%\\([0-9A-F][0-9A-F]\\)" string i)
173 (setq dest (concat dest
174 (substring string i (match-beginning 0))
177 (string-to-int (match-string 1 string) 16))))
179 (decode-coding-string
180 (concat dest (substring string i))
183 (defun www-feature-type (feature-name)
184 (or (char-feature-property feature-name 'type)
185 (let ((str (symbol-name feature-name)))
187 ((string-match "\\*note\\(@[^*]+\\)?$" str)
189 ((string-match "\\*sources\\(@[^*]+\\)?$" str)
191 ((string-match "\\*" str)
193 ((string-match "^\\(->\\|<-\\)" str)
195 ((string-match "^ideographic-structure\\(@\\|$\\)" str)
199 (defun www-feature-format (feature-name)
200 (or (char-feature-property feature-name 'presentation-format)
201 (char-feature-property feature-name 'format)
203 (setq fn feature-name)
204 (while (and (setq parent (char-feature-name-parent fn))
206 (char-feature-property
210 '((name) " : " (value))))
212 (defun www-feature-value-format (feature-name)
213 (or (char-feature-property feature-name 'value-presentation-format)
214 (char-feature-property feature-name 'value-format)
216 (setq fn feature-name)
217 (while (and (setq parent (char-feature-name-parent fn))
219 (or (char-feature-property
220 parent 'value-presentation-format)
221 (char-feature-property
222 parent 'value-format)))))
225 (let ((type (www-feature-type feature-name)))
226 (cond ((eq type 'relation)
228 ((eq type 'structure)
229 'space-separated-ids)
233 (if (find-charset feature-name)
234 (if (and (= (charset-dimension feature-name) 2)
235 (= (charset-chars feature-name) 94))
237 " (" (decimal) ") <" (ku-ten) "> " (prev-char) (next-char))
238 '("0x" (HEX) " (" (decimal) ") " (prev-char) (next-char))))
241 (defun char-feature-name-at-domain (feature-name domain)
243 (let ((name (symbol-name feature-name)))
245 ((string-match "@[^*]+$" name)
246 (intern (format "%s/%s" name domain))
249 (intern (format "%s@%s" name domain))
253 (defun char-feature-name-parent (feature-name)
254 (let ((name (symbol-name feature-name)))
255 (if (string-match "@[^@/*]+\\(/[^@/*]+\\)*$" name)
256 (intern (substring name 0 (car (last (match-data) 2)))))))
258 (defun char-feature-name-domain (feature-name)
259 (let ((name (symbol-name feature-name)))
260 (if (string-match "@[^@/*]+\\(/[^@/*]+\\)*$" name)
261 (intern (substring name (1+ (match-beginning 0)))))))
263 (defun char-feature-name-sans-versions (feature)
264 (let ((feature-name (symbol-name feature)))
265 (if (string-match "[@/]\\$rev=latest$" feature-name)
266 (intern (substring feature-name 0 (match-beginning 0)))
269 (defun est-object-genre (object)
270 (if (characterp object)
272 (concord-object-genre object)))
274 (defun www-get-feature-value (object feature)
275 (let ((latest-feature (char-feature-name-at-domain feature '$rev=latest)))
278 (mount-char-attribute-table latest-feature)
279 (or (char-feature object latest-feature)
280 (char-feature object feature))
283 (or (condition-case nil
284 (concord-object-get object latest-feature)
287 (concord-object-get object feature)
291 (defun get-previous-code-point (ccs code)
292 (let ((chars (charset-chars ccs))
293 (dim (charset-dimension ccs))
295 mask byte-min byte-max
318 (setq bytes (make-vector dim 0))
320 (aset bytes i (logand (lsh code (* i -8)) mask))
323 (while (and (< i dim)
325 (aset bytes i (1- (aref bytes i)))
326 (< (aref bytes i) byte-min)))
327 (aset bytes i byte-max)
330 (setq dest (aref bytes 0)
333 (setq dest (logior dest (lsh (aref bytes i) (* i 8)))
337 (defun get-next-code-point (ccs code)
338 (let ((chars (charset-chars ccs))
339 (dim (charset-dimension ccs))
341 mask byte-min byte-max
364 (setq bytes (make-vector dim 0))
366 (aset bytes i (logand (lsh code (* i -8)) mask))
369 (while (and (< i dim)
371 (aset bytes i (1+ (aref bytes i)))
372 (> (aref bytes i) byte-max)))
373 (aset bytes i byte-min)
376 (setq dest (aref bytes 0)
379 (setq dest (logior dest (lsh (aref bytes i) (* i 8)))
383 (defun find-previous-defined-code-point (ccs code)
384 (let ((i (get-previous-code-point ccs code))
387 ((eq ccs '=jis-x0208)
388 (setq ccs '=jis-x0208@1990))
389 ((eq ccs '=jis-x0213-1)
390 (setq ccs '=jis-x0213-1@2004)))
393 (null (setq char (decode-char ccs i
394 (unless (eq ccs '=ucs)
396 (setq i (get-previous-code-point ccs i)))
399 (defun find-next-defined-code-point (ccs code)
400 (let ((i (get-next-code-point ccs code))
402 (setq max (+ code 1000))
404 ((eq ccs '=jis-x0208)
405 (setq ccs '=jis-x0208@1990))
406 ((eq ccs '=jis-x0213-1)
407 (setq ccs '=jis-x0213-1@2004)))
410 (null (setq char (decode-char ccs i
411 (unless (eq ccs '=ucs)
413 (setq i (get-next-code-point ccs i)))
417 ;;; @ URI representation
420 ;; (defun est-uri-decode-feature-name-body (uri-feature)
421 ;; (let ((len (length uri-feature))
428 ;; (if (eq (aref uri-feature i) ?\.)
429 ;; (if (and (< (+ i 2) len)
430 ;; (eq (aref uri-feature (+ i 2)) ?\.))
433 ;; ((eq (setq ch (aref uri-feature (1+ i))) ?\.)
440 ;; (substring uri-feature i (+ i 3))
446 ;; (char-to-string (aref uri-feature i))
447 ;; (setq i (1+ i)))))))
450 ;; (defun est-uri-encode-feature-name-body (feature)
451 ;; (mapconcat (lambda (c)
458 ;; (t (char-to-string c))))
461 (defun www-uri-decode-feature-name (uri-feature)
463 (setq uri-feature (decode-uri-string uri-feature 'utf-8-mcs-er))
465 ((string-match "^from\\." uri-feature)
466 (intern (format "<-%s"
467 (est-uri-decode-feature-name-body
468 (substring uri-feature (match-end 0)))))
470 ((string-match "^to\\." uri-feature)
471 (intern (format "->%s"
472 (est-uri-decode-feature-name-body
473 (substring uri-feature (match-end 0)))))
475 ((string-match "^rep\\." uri-feature)
476 (intern (format "=%s"
477 (est-uri-decode-feature-name-body
478 (substring uri-feature (match-end 0)))))
480 ((string-match "^rep[2i]\\." uri-feature)
481 (intern (format "===%s"
482 (est-uri-decode-feature-name-body
483 (substring uri-feature (match-end 0)))))
485 ((string-match "^g\\." uri-feature)
486 (intern (format "=>>%s"
487 (est-uri-decode-feature-name-body
488 (substring uri-feature (match-end 0)))))
490 ((string-match "^g[i2]\\." uri-feature)
491 (intern (format "==%s"
492 (est-uri-decode-feature-name-body
493 (substring uri-feature (match-end 0)))))
495 ((string-match "^gi\\([0-9]+\\)\\." uri-feature)
496 (intern (format "=>>%s%s"
497 (make-string (string-to-int
498 (match-string 1 uri-feature))
500 (est-uri-decode-feature-name-body
501 (substring uri-feature (match-end 0)))))
503 ((string-match "^o\\." uri-feature)
504 (intern (format "=+>%s"
505 (est-uri-decode-feature-name-body
506 (substring uri-feature (match-end 0)))))
508 ((string-match "^a\\." uri-feature)
509 (intern (format "=>%s"
510 (est-uri-decode-feature-name-body
511 (substring uri-feature (match-end 0)))))
513 ((string-match "^a\\([0-9]+\\)\\." uri-feature)
514 (intern (format "%s>%s"
515 (make-string (string-to-int
516 (match-string 1 uri-feature))
518 (est-uri-decode-feature-name-body
519 (substring uri-feature (match-end 0)))))
521 ((and (setq uri-feature (est-uri-decode-feature-name-body uri-feature))
522 (setq feature (intern (format "=>%s" uri-feature)))
523 (find-charset feature))
525 ((and (setq feature (intern (format "=>>%s" uri-feature)))
526 (find-charset feature))
528 ((and (setq feature (intern (format "=>>>%s" uri-feature)))
529 (find-charset feature))
531 ((and (setq feature (intern (format "=%s" uri-feature)))
532 (find-charset feature))
534 (t (intern uri-feature)))))
536 (defun www-uri-encode-feature-name (feature-name)
537 (setq feature-name (symbol-name feature-name))
539 ((string-match "^=\\+>\\([^=>]+\\)" feature-name)
541 (est-uri-encode-feature-name-body
542 (substring feature-name (match-beginning 1))))
544 ((string-match "^=\\([^=>]+\\)" feature-name)
546 (est-uri-encode-feature-name-body
547 (substring feature-name (match-beginning 1))))
549 ((string-match "^==\\([^=>]+\\)" feature-name)
551 (est-uri-encode-feature-name-body
552 (substring feature-name (match-beginning 1))))
554 ((string-match "^===\\([^=>]+\\)" feature-name)
556 (est-uri-encode-feature-name-body
557 (substring feature-name (match-beginning 1))))
559 ((string-match "^=>>\\([^=>]+\\)" feature-name)
561 (est-uri-encode-feature-name-body
562 (substring feature-name (match-beginning 1))))
564 ((string-match "^=>>>\\([^=>]+\\)" feature-name)
566 (est-uri-encode-feature-name-body
567 (substring feature-name (match-beginning 1))))
569 ((string-match "^=>>\\(>+\\)" feature-name)
571 (length (match-string 1 feature-name))
572 (est-uri-encode-feature-name-body
573 (substring feature-name (match-end 1))))
575 ((string-match "^=>\\([^=>]+\\)" feature-name)
577 (est-uri-encode-feature-name-body
578 (substring feature-name (match-beginning 1))))
580 ((string-match "^\\(=+\\)>" feature-name)
582 (length (match-string 1 feature-name))
583 (est-uri-encode-feature-name-body
584 (substring feature-name (match-end 0))))
586 ((string-match "^->" feature-name)
588 (est-uri-encode-feature-name-body
589 (substring feature-name (match-end 0))))
591 ((string-match "^<-" feature-name)
593 (est-uri-encode-feature-name-body
594 (substring feature-name (match-end 0))))
596 (t (est-uri-encode-feature-name-body feature-name))))
598 (defun www-uri-make-feature-name-url (uri-genre uri-feature-name uri-object)
599 (if est-hide-cgi-mode
600 (format "../feature/%s&%s/%s"
601 uri-feature-name uri-genre uri-object)
602 (format "%s?feature=%s&%s=%s"
603 chise-wiki-view-url uri-feature-name uri-genre uri-object)))
605 (defun www-uri-decode-object (genre char-rep)
608 ((string-match (if est-hide-cgi-mode
609 "\\(%3D\\|=\\|%3A\\|:\\)"
610 "\\(%3A\\|:\\)") char-rep)
611 (setq ccs (substring char-rep 0 (match-beginning 0))
612 cpos (substring char-rep (match-end 0)))
613 (setq ccs (www-uri-decode-feature-name ccs))
614 (setq cpos (est-uri-decode-feature-name-body cpos))
616 ((string-match "^0x" cpos)
618 (string-to-number (substring cpos (match-end 0)) 16))
621 (setq cpos (car (read-from-string
623 cpos file-name-coding-system))))
625 (if (and (eq genre 'character)
627 (decode-char ccs cpos)
628 (concord-decode-object ccs cpos genre))
631 (setq char-rep (decode-uri-string char-rep 'utf-8-mcs-er))
633 ((eq genre 'character)
634 (when (= (length char-rep) 1)
638 (concord-decode-object
639 '=id (www-uri-decode-feature-name char-rep) 'feature)
642 (concord-decode-object
643 '=id (car (read-from-string char-rep)) genre)
646 (defun www-uri-encode-object (object)
647 (if (characterp object)
648 (if (encode-char object '=ucs)
651 (format "%%%02X" byte))
652 (encode-coding-string (char-to-string object) 'utf-8-mcs-er)
654 (let ((ccs-list est-coded-charset-priority-list)
657 (setq ccs (pop ccs-list))
658 (not (setq ret (encode-char object ccs 'defined-only)))))
660 (format (if est-hide-cgi-mode
663 (www-uri-encode-feature-name ccs)
665 ((and (setq ccs (car (split-char object)))
666 (setq ret (encode-char object ccs)))
667 (format (if est-hide-cgi-mode
670 (www-uri-encode-feature-name ccs)
673 (format (if est-hide-cgi-mode
674 "system-char-id=0x%X"
675 "system-char-id:0x%X")
676 (encode-char object 'system-char-id))
678 (format (if est-hide-cgi-mode
681 (est-uri-encode-feature-name-body
682 (format "%s" (concord-object-id object))))))
684 (defun est-format-object (object &optional readable)
685 (if (characterp object)
686 (char-to-string object)
687 (let ((ret (or (if readable
688 (or (concord-object-get object 'name)
689 (concord-object-get object '=name)
690 (concord-object-get object 'title)))
691 (concord-object-id object))))
694 (defun www-uri-make-object-url (object &optional uri-object)
695 (if est-hide-cgi-mode
698 (est-object-genre object)
700 (www-uri-encode-object object)))
703 (est-object-genre object)
705 (www-uri-encode-object object)))))
708 ;;; @ Feature name presentation
711 (defun www-format-feature-name-default (feature-name)
715 (symbol-name feature-name)
719 (defun www-format-feature-name-as-metadata (feature-name &optional lang)
720 (let ((str (symbol-name feature-name))
723 ((string-match "\\*[^*]+$" str)
724 (setq base (substring str 0 (match-beginning 0))
725 meta (substring str (match-beginning 0)))
726 (concat (www-format-feature-name* (intern base) lang)
729 (www-format-feature-name-default feature-name)
732 (defun www-format-feature-name-as-rel-to (feature-name)
733 (concat "\u2192" (substring (symbol-name feature-name) 2)))
735 (defun www-format-feature-name-as-rel-from (feature-name)
736 (concat "\u2190" (substring (symbol-name feature-name) 2)))
738 (defun www-format-feature-name-as-CCS (feature-name)
741 (symbol-name feature-name)
743 (dest (upcase (pop rest))))
744 (when (string-match "^=+>*" dest)
745 (setq dest (concat (substring dest 0 (match-end 0))
747 (substring dest (match-end 0)))))
751 (setq dest (concat dest " " (upcase (pop rest)))))
752 (if (string-match "^[0-9]+$" (car rest))
753 (concat dest "-" (car rest))
754 (concat dest " " (upcase (car rest))))
758 (defun www-format-feature-name* (feature-name &optional lang)
759 (let (name fn parent ret)
762 (char-feature-property
764 (intern (format "name@%s" lang))))
765 (char-feature-property
766 feature-name 'name)))
767 ((and (setq name (symbol-name feature-name))
768 (string-match "\\*" name))
769 (www-format-feature-name-as-metadata feature-name lang))
771 (setq fn feature-name)
772 (while (and (setq parent (char-feature-name-parent fn))
775 (char-feature-property
777 (intern (format "name@%s" lang))))
778 (char-feature-property
783 (concat ret (substring (symbol-name feature-name)
784 (length (symbol-name parent)))))
785 ((find-charset feature-name)
786 (www-format-feature-name-as-CCS feature-name))
787 ((string-match "^\\(->\\)" name)
788 (www-format-feature-name-as-rel-to feature-name))
789 ((string-match "^\\(<-\\)" name)
790 (www-format-feature-name-as-rel-from feature-name))
792 (www-format-feature-name-default feature-name)
796 (defun www-format-feature-name (feature-name &optional lang)
797 (www-format-encode-string
798 (www-format-feature-name* feature-name lang)))
804 (defvar www-format-char-img-style "vertical-align:bottom;")
806 (defun www-format-encode-string (string &optional without-tags as-body)
809 (let (plane code subcode start end char variants ret rret)
811 (goto-char (point-min))
812 (while (search-forward "&" nil t)
813 (replace-match "&" nil t)))
814 (goto-char (point-min))
815 (while (search-forward "<" nil t)
816 (replace-match "<" nil t))
817 (goto-char (point-min))
818 (while (search-forward ">" nil t)
819 (replace-match ">" nil t))
821 (encode-coding-region (point-min)(point-max) 'utf-8-mcs-er)
822 (let ((coded-charset-entity-reference-alist
826 '(=hanyo-denshi/ja "HD-JA-" 4 X)
827 '(=hanyo-denshi/jb "HD-JB-" 4 X)
828 '(=hanyo-denshi/jc "HD-JC-" 4 X)
829 '(=hanyo-denshi/jd "HD-JD-" 4 X)
830 '(=hanyo-denshi/ft "HD-FT-" 4 X)
831 '(=hanyo-denshi/ia "HD-IA-" 4 X)
832 '(=hanyo-denshi/ib "HD-IB-" 4 X)
833 '(=hanyo-denshi/hg "HD-HG-" 4 X)
834 '(=hanyo-denshi/ip "HD-IP-" 4 X)
835 '(=hanyo-denshi/jt "HD-JT-" 4 X)
836 '(=hanyo-denshi/ks "HD-KS-" 6 d)
837 '(=>>hanyo-denshi/ja "G-HD-JA-" 4 X)
838 '(=>>hanyo-denshi/jb "G-HD-JB-" 4 X)
839 '(=>>hanyo-denshi/jc "G-HD-JC-" 4 X)
840 '(=>>hanyo-denshi/jd "G-HD-JD-" 4 X)
841 '(=>>hanyo-denshi/ft "G-HD-FT-" 4 X)
842 '(=>>hanyo-denshi/ia "G-HD-IA-" 4 X)
843 '(=>>hanyo-denshi/ib "G-HD-IB-" 4 X)
844 '(=>>hanyo-denshi/hg "G-HD-HG-" 4 X)
845 '(=>>hanyo-denshi/ip "G-HD-IP-" 4 X)
846 '(=>>hanyo-denshi/jt "G-HD-JT-" 4 X)
847 '(=>>hanyo-denshi/ks "G-HD-KS-" 6 d)
849 '(==hanyo-denshi/ja "g2-HD-JA-" 4 X)
850 '(==hanyo-denshi/jb "g2-HD-JB-" 4 X)
851 '(==hanyo-denshi/jc "g2-HD-JC-" 4 X)
852 '(==hanyo-denshi/jd "g2-HD-JD-" 4 X)
853 '(==hanyo-denshi/ft "g2-HD-FT-" 4 X)
854 '(==hanyo-denshi/ia "g2-HD-IA-" 4 X)
855 '(==hanyo-denshi/ib "g2-HD-IB-" 4 X)
856 '(==hanyo-denshi/hg "g2-HD-HG-" 4 X)
857 '(==hanyo-denshi/ip "g2-HD-IP-" 4 X)
858 '(==hanyo-denshi/jt "g2-HD-JT-" 4 X)
859 '(==hanyo-denshi/ks "g2-HD-KS-" 6 d)
860 '(==daijiten "g2-DJT-" 5 d)
861 '(=cns11643-1 "C1-" 4 X)
862 '(=cns11643-2 "C2-" 4 X)
863 '(=cns11643-3 "C3-" 4 X)
864 '(=cns11643-4 "C4-" 4 X)
865 '(=cns11643-5 "C5-" 4 X)
866 '(=cns11643-6 "C6-" 4 X)
867 '(=cns11643-7 "C7-" 4 X)
868 '(=adobe-japan1-6 "AJ1-" 5 d)
869 '(=big5-cdp "CDP-" 4 X)
870 '(=>big5-cdp "A-CDP-" 4 X)
872 '(=gb12345 "G1-" 4 X)
873 '(=jis-x0208@1990 "J90-" 4 X)
874 '(=jis-x0212 "JSP-" 4 X)
876 '(=jis-x0208@1997 "J97-" 4 X)
877 '(=jis-x0208@1978 "J78-" 4 X)
878 '(=jis-x0208@1983 "J83-" 4 X)
879 '(=ruimoku-v6 "RUI6-" 4 X)
880 '(=zinbun-oracle "ZOB-" 4 d)
881 '(=daijiten "DJT-" 5 d)
882 '(=jef-china3 "JC3-" 4 X)
883 '(=ucs@unicode "UU+" 4 X)
884 '(=ucs@JP/hanazono "hanaJU+" 4 X)
885 '(==cns11643-1 "R-C1-" 4 X)
886 '(==cns11643-2 "R-C2-" 4 X)
887 '(==cns11643-3 "R-C3-" 4 X)
888 '(==cns11643-4 "R-C4-" 4 X)
889 '(==cns11643-5 "R-C5-" 4 X)
890 '(==cns11643-6 "R-C6-" 4 X)
891 '(==cns11643-7 "R-C7-" 4 X)
892 '(=hanziku-1 "HZK01-" 4 X)
893 '(=hanziku-2 "HZK02-" 4 X)
894 '(=hanziku-3 "HZK03-" 4 X)
895 '(=hanziku-4 "HZK04-" 4 X)
896 '(=hanziku-5 "HZK05-" 4 X)
897 '(=hanziku-6 "HZK06-" 4 X)
898 '(=hanziku-7 "HZK07-" 4 X)
899 '(=hanziku-8 "HZK08-" 4 X)
900 '(=hanziku-9 "HZK09-" 4 X)
901 '(=hanziku-10 "HZK10-" 4 X)
902 '(=hanziku-11 "HZK11-" 4 X)
903 '(=hanziku-12 "HZK12-" 4 X)
904 '(==>daijiten "A2-DJT-" 5 d)
907 '(=daikanwa "M-" 5 d)
908 coded-charset-entity-reference-alist)))
909 (encode-coding-region (point-min)(point-max) 'utf-8-mcs-er)
911 (goto-char (point-min))
912 (while (re-search-forward "&\\(A-\\|G-\\|g2-\\|R-\\)?CB\\([0-9]+\\);" nil t)
913 (setq code (string-to-int (match-string 2)))
915 (format "<img alt=\"CB%05d\" src=\"%s/cb-gaiji/%02d/CB%05d.gif\"
918 chise-wiki-bitmap-glyphs-url
920 www-format-char-img-style)
923 (goto-char (point-min))
924 (while (re-search-forward "&\\(o-\\|G-\\|g2-\\|R-\\)?J\\(78\\|83\\|90\\|97\\|SP\\)-\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\\);" nil t)
925 (setq plane (match-string 2)
926 code (string-to-int (match-string 3) 16))
928 (format "<img alt=\"J%s-%04X\" src=\"%s/JIS-%s/%02d-%02d.gif\"
931 chise-wiki-bitmap-glyphs-url
934 (- (logand code 255) 32)
935 www-format-char-img-style)
938 (goto-char (point-min))
939 (while (re-search-forward "&\\(o-\\|G-\\|g2-\\|R-\\)?J0-\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\\);" nil t)
940 (setq code (string-to-int (match-string 2) 16))
942 (format "<img alt=\"J0-%04X\" src=\"%s/JIS-90/%02d-%02d.gif\"
945 chise-wiki-bitmap-glyphs-url
947 (- (logand code 255) 32)
948 www-format-char-img-style)
951 (goto-char (point-min))
952 (while (re-search-forward "&\\(o-\\|G-\\|g2-\\|R-\\)?HD-\\(JA\\|JB\\|JC\\|JD\\|FT\\|IA\\|IB\\|HG\\)-\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\\);" nil t)
953 (setq plane (match-string 2)
954 code (string-to-int (match-string 3) 16))
956 (format "<img alt=\"HD-%s-%04X\" src=\"%s/IVD/HanyoDenshi/%s%02d%02d.png\"
959 chise-wiki-bitmap-glyphs-url
962 (- (logand code 255) 32)
963 www-format-char-img-style)
966 (goto-char (point-min))
967 (while (re-search-forward "&\\(o-\\|G-\\|g2-\\|R-\\)?HD-\\(IP\\|JT\\)-\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\\);" nil t)
968 (setq plane (match-string 2)
969 code (string-to-int (match-string 3) 16))
971 (format "<img alt=\"HD-%s-%04X\" src=\"%s/IVD/HanyoDenshi/%s%04X.png\"
974 chise-wiki-bitmap-glyphs-url
976 www-format-char-img-style)
979 (goto-char (point-min))
980 (while (re-search-forward "&\\(o-\\|G-\\|g2-\\|R-\\)?HD-KS-\\([0-9]+\\);" nil t)
981 (setq code (string-to-int (match-string 2)))
983 (format "<img alt=\"HD-KS%06d\" src=\"%s/IVD/HanyoDenshi/KS%06d.png\"
984 style=\"vertical-align:middle\">"
986 chise-wiki-bitmap-glyphs-url
988 www-format-char-img-style)
991 (goto-char (point-min))
992 (while (re-search-forward "&G\\([01]\\)-\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\\);" nil t)
993 (setq plane (string-to-int (match-string 1))
994 code (string-to-int (match-string 2) 16))
996 (format "<img alt=\"GB%d-%04X\" src=\"%s/GB%d/%02d-%02d.gif\"
999 chise-wiki-bitmap-glyphs-url
1001 (- (lsh code -8) 32)
1002 (- (logand code 255) 32)
1003 www-format-char-img-style)
1006 (goto-char (point-min))
1007 (while (re-search-forward "&\\(R-\\)?C\\([1-7]\\)-\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\\);" nil t)
1008 (setq plane (string-to-int (match-string 2))
1009 code (string-to-int (match-string 3) 16))
1011 (format "<img alt=\"CNS%d-%04X\" src=\"%s/CNS%d/%04X.gif\"
1014 chise-wiki-bitmap-glyphs-url
1016 www-format-char-img-style)
1019 (goto-char (point-min))
1020 (while (re-search-forward "&\\(R-\\)?JC3-\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\\);" nil t)
1021 (setq code (string-to-int (match-string 2) 16))
1023 (format "<img alt=\"JC3-%04X\" src=\"http://kanji.zinbun.kyoto-u.ac.jp/db/CHINA3/Gaiji/%04x.gif\">"
1027 (goto-char (point-min))
1028 (while (re-search-forward "&\\(A-\\)?ZOB-\\([0-9]+\\);" nil t)
1029 (setq code (string-to-int (match-string 2)))
1031 (format "<img alt=\"ZOB-%04d\" src=\"%s/ZOB-1968/%04d.png\"
1032 style=\"vertical-align:middle\">"
1034 chise-wiki-bitmap-glyphs-url
1036 www-format-char-img-style)
1039 (goto-char (point-min))
1040 (while (re-search-forward "&\\(A2-\\|g2-\\|R-\\)?DJT-\\([0-9]+\\);" nil t)
1041 (setq code (string-to-int (match-string 2)))
1043 (format "<img alt=\"DJT-%05d\" src=\"%s/%05d.png\"
1044 style=\"vertical-align:middle; width: auto; max-height: 60px\">"
1046 chise-wiki-daijiten-bitmap-glyphs-url
1048 www-format-char-img-style)
1051 (goto-char (point-min))
1052 (while (re-search-forward "&SW-JIGUGE\\([45]?\\)-\\([0-9]+\\);" nil t)
1053 (setq subcode (match-string 1)
1054 code (string-to-int (match-string 2)))
1056 (if (string= subcode "")
1060 (format "<div class=\"tooltip\"><img alt=\"SW-JIGUGE%s-%05d\" src=\"%s/ShuoWen/Jiguge%s/%05d.png\"
1061 style=\"vertical-align:middle; width: auto; max-height: 80px\"><span
1062 class=\"tooltiptext\">%s</span></div>"
1064 chise-wiki-bitmap-glyphs-url
1066 (charset-description
1067 (if (string= subcode "")
1069 (intern (format "===shuowen-jiguge%s" subcode)))))
1072 (goto-char (point-min))
1073 (while (re-search-forward "&HNG\\([0-9]+\\)-\\([0-9][0-9][0-9][0-9]\\)\\([0-9]\\);" nil t)
1074 (setq plane (match-string 1)
1075 code (string-to-int (match-string 2))
1076 subcode (string-to-int (match-string 3)))
1080 (char-to-string (decode-char 'ascii (+ 96 subcode)))))
1083 "<div class=\"tooltip\"><img alt=\"HNG%s-%04d%s\" src=\"%s/%s/%04d%s.png\" style=\"
1084 vertical-align:middle; width: auto; max-height: 60px\"><span
1085 class=\"tooltiptext\">%s</span></div>"
1087 chise-wiki-hng-bitmap-glyphs-url
1089 (charset-description
1090 (car (find (format "HNG%s-" plane)
1091 coded-charset-entity-reference-alist
1092 :test (lambda (key cell)
1093 (string= key (nth 1 cell))))))
1097 (goto-char (point-min))
1098 (while (re-search-forward "&\\(o-\\|G-\\|g2-\\|R-\\)?AJ1-\\([0-9]+\\);" nil t)
1099 (setq code (string-to-int (match-string 2)))
1101 (format "<img alt=\"AJ1-%05d\" src=\"%s/IVD/AdobeJapan1/CID+%d.png\"
1102 style=\"vertical-align:middle\">"
1104 chise-wiki-bitmap-glyphs-url
1106 www-format-char-img-style)
1109 (goto-char (point-min))
1110 (while (re-search-forward "&\\(A-\\|o-\\|G-\\|g2-\\|R-\\)?MJ\\([0-9]+\\);" nil t)
1111 (setq code (string-to-int (match-string 2)))
1113 (format "<img alt=\"MJ%06d\" src=\"http://mojikiban.ipa.go.jp/MJ%06d.png\"
1114 style=\"vertical-align:middle; width: 48px; height: 48px\">"
1117 www-format-char-img-style)
1120 (goto-char (point-min))
1121 (while (re-search-forward "&\\(o-\\|G-\\|g2-\\)?IU[+-]\\([0-9A-F]+\\);" nil t)
1122 (setq code (string-to-int (match-string 2) 16))
1124 (format "<img alt=\"u%04x\" src=\"http://glyphwiki.org/glyph/u%04x.100px.png\"
1125 style=\"vertical-align:middle; width: 48px; height: 48px\">"
1128 www-format-char-img-style)
1131 (goto-char (point-min))
1132 (while (re-search-forward "&A-\\(comp\\|cgn\\)U[+-]\\([0-9A-F]+\\);" nil t)
1133 (setq code (string-to-int (match-string 2) 16))
1135 (format "<img alt=\"u%04x\" src=\"http://glyphwiki.org/glyph/u%04x.100px.png\"
1136 style=\"vertical-align:middle; width: 48px; height: 48px\">"
1139 www-format-char-img-style)
1142 (goto-char (point-min))
1143 (while (re-search-forward
1144 "&\\(A-\\|g2-\\)?U-i\\([0-9]+\\)\\+\\([0-9A-F]+\\);"
1146 (setq plane (string-to-int (match-string 2))
1147 code (string-to-int (match-string 3) 16))
1149 (format "<img alt=\"u%04x-itaiji-%03d\" src=\"http://glyphwiki.org/glyph/u%04x-itaiji-%03d.100px.png\"
1150 style=\"vertical-align:middle; width: 48px; height: 48px\">"
1155 www-format-char-img-style)
1158 (goto-char (point-min))
1159 (while (re-search-forward "&A-IWDSU\\+\\([0-9A-F]+\\);" nil t)
1160 (setq code (string-to-int (match-string 1) 16))
1162 (format "<img alt=\"A-IWDSU+%04x\" src=\"http://glyphwiki.org/glyph/u%04x.100px.png\"
1163 style=\"vertical-align:middle; width: 48px; height: 48px\">"
1166 www-format-char-img-style)
1169 (goto-char (point-min))
1170 (while (re-search-forward
1171 "&\\(A-\\)?CDP-i\\([0-9]+\\)-\\([0-9A-F]+\\);"
1173 (setq plane (string-to-int (match-string 2))
1174 code (string-to-int (match-string 3) 16))
1176 (format "<img alt=\"cdp-%04x-itaiji-%03d\" src=\"http://glyphwiki.org/glyph/cdp-%04x-itaiji-%03d.100px.png\"
1177 style=\"vertical-align:middle; width: 48px; height: 48px\">"
1182 www-format-char-img-style)
1185 (goto-char (point-min))
1186 (while (re-search-forward "&\\(g2-\\)?U-v\\([0-9]+\\)\\+\\([0-9A-F]+\\);" nil t)
1187 (setq plane (string-to-int (match-string 2))
1188 code (string-to-int (match-string 3) 16))
1190 (format "<img alt=\"u%04x-var-%03d\" src=\"http://glyphwiki.org/glyph/u%04x-var-%03d.100px.png\"
1191 style=\"vertical-align:middle; width: 48px; height: 48px\">"
1196 www-format-char-img-style)
1199 (goto-char (point-min))
1200 (while (re-search-forward "&\\(A-\\|G-\\|R-\\|g2-\\)?GT-\\([0-9]+\\);" nil t)
1201 (setq code (string-to-int (match-string 2)))
1203 (format "<img alt=\"GT-%05d\" src=\"%s?char=GT-%05d\"
1206 chise-wiki-glyph-cgi-url
1208 www-format-char-img-style)
1211 (goto-char (point-min))
1212 (while (re-search-forward "&\\(A-\\|G-\\|g2-\\)?GT-K\\([0-9]+\\);" nil t)
1213 (setq code (string-to-int (match-string 2)))
1215 (format "<img alt=\"GT-K%05d\" src=\"%s?char=GT-K%05d\"
1218 chise-wiki-glyph-cgi-url
1220 www-format-char-img-style)
1223 (goto-char (point-min))
1224 (while (re-search-forward "&B-\\([0-9A-F]+\\);" nil t)
1225 (setq code (string-to-int (match-string 1) 16))
1227 (format "<img alt=\"B-%04X\" src=\"%s?char=B-%04X\"
1230 chise-wiki-glyph-cgi-url
1232 www-format-char-img-style)
1235 (goto-char (point-min))
1236 (while (re-search-forward
1237 "&\\(A-\\|G-\\|g2-\\|R-\\)?CDP-\\([0-9A-F]+\\);" nil t)
1238 (setq code (string-to-int (match-string 2) 16))
1240 (format "<img alt=\"CDP-%04X\" src=\"%s?char=CDP-%04X\"
1243 chise-wiki-glyph-cgi-url
1245 www-format-char-img-style)
1248 (goto-char (point-min))
1249 (while (re-search-forward
1250 "&\\(I-\\)?HZK\\(0[1-9]\\|1[0-2]\\)-\\([0-9A-F]+\\);" nil t)
1251 (setq plane (match-string 2)
1252 code (string-to-int (match-string 3) 16))
1254 (format "<img alt=\"HZK%s-%04X\" src=\"%s?char=HZK%s-%04X\"
1258 chise-wiki-glyph-cgi-url
1261 www-format-char-img-style)
1264 (goto-char (point-min))
1265 (while (re-search-forward "&\\(A-\\|G-\\|g2-\\|R-\\)?RUI6-\\([0-9A-F]+\\);" nil t)
1266 (setq code (string-to-int (match-string 2) 16))
1268 (format "<img alt=\"RUI6-%04X\" src=\"%s?char=RUI6-%04X\"
1269 style=\"vertical-align:middle\">"
1271 chise-wiki-glyph-cgi-url
1273 www-format-char-img-style)
1276 (goto-char (point-min))
1277 (while (re-search-forward "&hanaJU\\+\\([0-9A-F]+\\);" nil t)
1278 (setq code (string-to-int (match-string 1) 16))
1280 (format "<img alt=\"hanaJU+%04X\" src=\"%s?char=hana-JU+%04X\"
1281 style=\"vertical-align:middle\">"
1283 chise-wiki-glyph-cgi-url
1285 www-format-char-img-style)
1288 (goto-char (point-min))
1289 (while (re-search-forward "&\\(A-\\|G-\\|g2-\\|R-\\)?\\(UU\\+\\|U-\\)\\([0-9A-F]+\\);" nil t)
1290 (setq code (string-to-int (match-string 3) 16))
1292 (format "<img alt=\"UU+%04X\" src=\"http://www.unicode.org/cgi-bin/refglyph?24-%04X\"
1293 style=\"vertical-align:middle\">"
1296 www-format-char-img-style)
1299 (goto-char (point-min))
1300 (while (re-search-forward "&MCS-\\([0-9A-F]+\\);" nil t)
1301 (setq code (string-to-int (match-string 1) 16))
1302 (setq start (match-beginning 0)
1304 (setq char (decode-char 'system-char-id code))
1306 ((and (setq variants
1307 (or (www-get-feature-value char '->subsumptive)
1308 (www-get-feature-value char '->denotational)))
1310 (if (characterp variants)
1311 (setq variants (list variants)))
1312 (while (and variants
1313 (setq ret (www-format-encode-string
1314 (char-to-string (car variants))))
1315 (string-match "&MCS-\\([0-9A-F]+\\);" ret))
1316 (setq variants (cdr variants)))
1318 (unless (string-match "&MCS-\\([0-9A-F]+\\);" ret)
1320 (delete-region start end)
1323 ((setq ret (or (www-get-feature-value char 'ideographic-combination)
1324 (www-get-feature-value char 'ideographic-structure)))
1329 (if (characterp (setq rret (find-char ch)))
1332 (www-format-encode-string
1333 (char-to-string ch) without-tags)
1334 (www-format-encode-string
1335 (format "%S" ch) without-tags)))
1339 (delete-region start end)
1343 ;; (goto-char (point-min))
1344 ;; (while (search-forward ">-" nil t)
1345 ;; (replace-match "&GT-" t 'literal))
1348 (defun www-html-display-text (text)
1352 (goto-char (point-min))
1353 (while (search-forward "<" nil t)
1354 (replace-match "<" nil t))
1355 (goto-char (point-min))
1356 (while (search-forward ">" nil t)
1357 (replace-match ">" nil t))
1358 (goto-char (point-min))
1359 (while (re-search-forward "\\[\\[\\([^]|[]+\\)|\\([^][]+\\)\\]\\]" nil t)
1361 (format "<a href=\"%s\">%s</a>"
1365 (encode-coding-region (point-min)(point-max) 'utf-8-mcs-er)
1366 (goto-char (point-min))
1367 (while (search-forward ">-" nil t)
1368 (replace-match "&GT-" nil t))
1371 (defun www-html-display-paragraph (text)
1373 (www-html-display-text text)
1380 (defvar coded-charset-GlyphWiki-id-alist
1381 '((===adobe-japan1-0 "aj1-" 5 d nil)
1382 (===adobe-japan1-1 "aj1-" 5 d nil)
1383 (===adobe-japan1-2 "aj1-" 5 d nil)
1384 (===adobe-japan1-3 "aj1-" 5 d nil)
1385 (===adobe-japan1-4 "aj1-" 5 d nil)
1386 (===adobe-japan1-5 "aj1-" 5 d nil)
1387 (===adobe-japan1-6 "aj1-" 5 d nil)
1388 (===ucs@jis "u" 4 x nil)
1389 (===daikanwa "dkw-" 5 d nil)
1390 (===ucs@ks "u" 4 x "-k")
1391 (==ucs-itaiji-005 "u" 4 x "-itaiji-005")
1392 (=ucs-var-001 "u" 4 x "-var-001")
1393 (=ucs-var-002 "u" 4 x "-var-002")
1394 (=ucs-var-003 "u" 4 x "-var-003")
1395 (=ucs-var-004 "u" 4 x "-var-004")
1396 (=ucs-itaiji-001 "u" 4 x "-itaiji-001")
1397 (=ucs-itaiji-002 "u" 4 x "-itaiji-002")
1398 (=ucs-itaiji-003 "u" 4 x "-itaiji-003")
1399 (=ucs-itaiji-084 "u" 4 x "-itaiji-084")
1400 (=>ucs-itaiji-001 "u" 4 x "-itaiji-001")
1401 (=>ucs-itaiji-006 "u" 4 x "-itaiji-006")
1402 (==adobe-japan1-0 "aj1-" 5 d nil)
1403 (==adobe-japan1-1 "aj1-" 5 d nil)
1404 (==adobe-japan1-2 "aj1-" 5 d nil)
1405 (==adobe-japan1-3 "aj1-" 5 d nil)
1406 (==adobe-japan1-4 "aj1-" 5 d nil)
1407 (==adobe-japan1-5 "aj1-" 5 d nil)
1408 (==adobe-japan1-6 "aj1-" 5 d nil)
1409 (==ucs@jis "u" 4 x nil)
1410 (==ucs@iso "u" 4 x nil)
1411 (==ucs@cns "u" 4 x "-t")
1412 (==ucs@unicode "u" 4 x "-us")
1413 (==daikanwa "dkw-" 5 d nil)
1414 (==ucs@ks "u" 4 x "-k")
1415 (==jis-x0208@1978 "j78-" 4 x nil)
1416 (==jis-x0208 "j90-" 4 x nil)
1417 (==jis-x0208@1990 "j90-" 4 x nil)
1418 (==jis-x0208@1983 "j83-" 4 x nil)
1419 (==cbeta "cbeta-" 5 d nil)
1420 (=>>hanyo-denshi/ks "koseki-" 6 d nil)
1421 (=>>jis-x0208@1978 "j78-" 4 x nil)
1422 (=>>big5-cdp "cdp-" 4 x nil)
1423 (=>>adobe-japan1-0 "aj1-" 5 d nil)
1424 (=>>adobe-japan1-1 "aj1-" 5 d nil)
1425 (=>>adobe-japan1-2 "aj1-" 5 d nil)
1426 (=>>adobe-japan1-3 "aj1-" 5 d nil)
1427 (=>>adobe-japan1-4 "aj1-" 5 d nil)
1428 (=>>adobe-japan1-5 "aj1-" 5 d nil)
1429 (=>>adobe-japan1-6 "aj1-" 5 d nil)
1430 (=>>jis-x0208 "j90-" 4 x nil)
1431 (=>>jis-x0208@1990 "j90-" 4 x nil)
1432 (=>>jis-x0208@1983 "j83-" 4 x nil)
1433 (=>>daikanwa "dkw-" 5 d nil)
1434 (=adobe-japan1-0 "aj1-" 5 d nil)
1435 (=adobe-japan1-1 "aj1-" 5 d nil)
1436 (=adobe-japan1-2 "aj1-" 5 d nil)
1437 (=adobe-japan1-3 "aj1-" 5 d nil)
1438 (=adobe-japan1-4 "aj1-" 5 d nil)
1439 (=adobe-japan1-5 "aj1-" 5 d nil)
1440 (=adobe-japan1-6 "aj1-" 5 d nil)
1441 (=decomposition@cid)
1442 (=decomposition@hanyo-denshi)
1443 (=hanyo-denshi/ks "koseki-" 6 d nil)
1444 (=koseki "koseki-" 6 d nil)
1445 (=ucs@jis "u" 4 x nil)
1446 (=ucs@cns "u" 4 x "-t")
1447 (=ucs@ks "u" 4 x "-k")
1448 (=ucs@JP "u" 4 x nil)
1449 (=ucs@gb "u" 4 x "-g")
1450 (=ucs@iso "u" 4 x "-u")
1451 (=ucs@unicode "u" 4 x "-us")
1452 (=big5-cdp "cdp-" 4 x nil)
1453 (=>big5-cdp "cdp-" 4 x nil)
1454 (=cbeta "cbeta-" 5 d nil)
1455 (=big5-cdp-var-3 "cdp-" 4 x "-var-3")
1456 (=big5-cdp-var-5 "cdp-" 4 x "-var-5")
1457 (=big5-cdp-itaiji-001 "cdp-" 4 x "-itaiji-001")
1458 (=big5-cdp-itaiji-002 "cdp-" 4 x "-itaiji-002")
1459 (=>big5-cdp-itaiji-001 "cdp-" 4 x "-itaiji-001")
1460 (=jef-china3 "jc3-" 4 x nil)
1461 (=jis-x0212 "jsp-" 4 x nil)
1462 (=jis-x0213-1@2000 "jx1-2000-" 4 x nil)
1463 (=jis-x0213-1@2004 "jx1-2004-" 4 x nil)
1464 (=jis-x0213-2 "jx2-" 4 x nil)
1465 (=gt-k "gt-k" 5 d nil)
1466 (=jis-x0208@1978/1pr "j78-" 4 x nil)
1467 (=jis-x0208@1978/-4pr "j78-" 4 x nil)
1468 (=jis-x0208@1978 "j78-" 4 x nil)
1469 (=+>jis-x0208@1978 "j78-" 4 x nil)
1470 (=+>jis-x0208 "j90-" 4 x nil)
1471 (=+>jis-x0208@1990 "j90-" 4 x nil)
1472 (=+>jis-x0208@1983 "j83-" 4 x nil)
1474 (=big5 "b-" 4 x nil)
1475 (=daikanwa "dkw-" 5 d nil)
1477 (=ruimoku-v6 "rui6-" 4 x nil)
1478 (=>ruimoku-v6 "rui6-" 4 x nil)
1479 (=ks-x1001 "k0-" 4 x nil)
1480 (=cns11643-1 "c1-" 4 x nil)
1481 (=cns11643-2 "c2-" 4 x nil)
1482 (=cns11643-3 "c3-" 4 x nil)
1483 (=cns11643-4 "c4-" 4 x nil)
1484 (=cns11643-5 "c5-" 4 x nil)
1485 (=cns11643-6 "c6-" 4 x nil)
1486 (=cns11643-7 "c7-" 4 x nil)
1487 (=jis-x0208 "j90-" 4 x nil)
1488 (=jis-x0208@1990 "j90-" 4 x nil)
1489 (=jis-x0208@1983 "j83-" 4 x nil)
1492 (defun char-GlyphWiki-id (char)
1493 (let ((rest coded-charset-GlyphWiki-id-alist)
1496 (setq spec (pop rest))
1497 (null (setq ret (get-char-attribute char (car spec))))))
1501 (mapconcat #'char-GlyphWiki-id ret "-"))
1502 (and (memq (car spec) '(=ucs@unicode '=ucs@iso))
1504 ((and (or (encode-char char '=jis-x0208@1990)
1505 (encode-char char '=jis-x0212)
1506 (encode-char char '=jis-x0213-1)
1507 (encode-char char '=jis-x0213-2))
1508 (setq code (encode-char char '=ucs@jis)))
1509 (format "u%04x" code)
1511 ((and (or (encode-char char '=gb2312)
1512 (encode-char char '=gb12345))
1513 (setq code (encode-char char '=ucs@gb)))
1514 (format "u%04x-g" code)
1516 ((and (or (encode-char char '=cns11643-1)
1517 (encode-char char '=cns11643-2)
1518 (encode-char char '=cns11643-3)
1519 (encode-char char '=cns11643-4)
1520 (encode-char char '=cns11643-5)
1521 (encode-char char '=cns11643-6)
1522 (encode-char char '=cns11643-7))
1523 (setq code (encode-char char '=ucs@cns)))
1524 (format "u%04x-t" code)
1526 ((and (encode-char char '=ks-x1001)
1527 (setq code (encode-char char '=ucs@ks)))
1528 (format "u%04x-k" code)
1530 (format (format "%s%%0%d%s%s"
1534 (or (nth 4 spec) ""))
1541 (provide 'cwiki-common)
1543 ;;; cwiki-common.el ends here