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)
66 (defvar est-hide-cgi-mode nil)
67 (defvar est-view-url-prefix "..")
68 (defvar chise-wiki-view-url "view.cgi")
69 (defvar chise-wiki-edit-url "edit.cgi")
71 (defvar chise-wiki-bitmap-glyphs-url
72 "http://www.chise.org/glyphs")
74 (defvar chise-wiki-hng-bitmap-glyphs-url
75 "http://hng.chise.org/glyphs/HNG")
77 (defvar chise-wiki-daijiten-bitmap-glyphs-url
78 "http://hng.chise.org/glyphs/daijiten")
80 (defvar chise-wiki-glyph-cgi-url
81 "http://www.chise.org/chisewiki/glyph.cgi")
83 (defvar chise-wiki-displayed-features nil)
85 (defvar est-coded-charset-priority-list
87 =cns11643-1 =cns11643-2 =cns11643-3
88 =cns11643-4 =cns11643-5 =cns11643-6 =cns11643-7
90 =jis-x0208 =jis-x0208@1990
95 =jis-x0213-1@2000 =jis-x0213-1@2004
96 =jis-x0208@1983 =jis-x0208@1978
97 =zinbun-oracle =>zinbun-oracle
101 =>>>jis-x0208 =>>>jis-x0213-1 =>>>jis-x0213-2
102 =>>jis-x0208 =>>jis-x0213-1 =>>jis-x0213-2
104 =+>jis-x0208 =+>jis-x0213-1 =+>jis-x0213-2
107 =>jis-x0208 =>jis-x0213-1
109 =>ucs@iso =>ucs@unicode
110 =>ucs@jis =>ucs@cns =>ucs@ks
111 =+>ucs@iso =+>ucs@unicode
112 =>>ucs@iso =>>ucs@unicode
113 =>>ucs@jis =>>ucs@cns =>>ucs@ks
114 =>>>ucs@iso =>>>ucs@unicode
115 =>>>ucs@jis =>>>ucs@cns =>>>ucs@ks
157 ===cns11643-1 ===cns11643-2 ===cns11643-3
158 ===cns11643-4 ===cns11643-5 ===cns11643-6 ===cns11643-7
161 (defun decode-uri-string (string &optional coding-system)
162 (if (> (length string) 0)
166 (mapconcat (lambda (char)
169 (char-to-string char)))
171 (while (string-match "%\\([0-9A-F][0-9A-F]\\)" string i)
172 (setq dest (concat dest
173 (substring string i (match-beginning 0))
176 (string-to-int (match-string 1 string) 16))))
178 (decode-coding-string
179 (concat dest (substring string i))
182 (defun www-feature-type (feature-name)
183 (or (char-feature-property feature-name 'type)
184 (let ((str (symbol-name feature-name)))
186 ((string-match "\\*note\\(@[^*]+\\)?$" str)
188 ((string-match "\\*sources\\(@[^*]+\\)?$" str)
190 ((string-match "\\*" str)
192 ((string-match "^\\(->\\|<-\\)" str)
194 ((string-match "^ideographic-structure\\(@\\|$\\)" str)
198 (defun www-feature-format (feature-name)
199 (or (char-feature-property feature-name 'presentation-format)
200 (char-feature-property feature-name 'format)
202 (setq fn feature-name)
203 (while (and (setq parent (char-feature-name-parent fn))
205 (char-feature-property
209 '((name) " : " (value))))
211 (defun www-feature-value-format (feature-name)
212 (or (char-feature-property feature-name 'value-presentation-format)
213 (char-feature-property feature-name 'value-format)
215 (setq fn feature-name)
216 (while (and (setq parent (char-feature-name-parent fn))
218 (or (char-feature-property
219 parent 'value-presentation-format)
220 (char-feature-property
221 parent 'value-format)))))
224 (let ((type (www-feature-type feature-name)))
225 (cond ((eq type 'relation)
227 ((eq type 'structure)
228 'space-separated-ids)
232 (if (find-charset feature-name)
233 (if (and (= (charset-dimension feature-name) 2)
234 (= (charset-chars feature-name) 94))
236 " (" (decimal) ") <" (ku-ten) "> " (prev-char) (next-char))
237 '("0x" (HEX) " (" (decimal) ") " (prev-char) (next-char))))
240 (defun char-feature-name-at-domain (feature-name domain)
242 (let ((name (symbol-name feature-name)))
244 ((string-match "@[^*]+$" name)
245 (intern (format "%s/%s" name domain))
248 (intern (format "%s@%s" name domain))
252 (defun char-feature-name-parent (feature-name)
253 (let ((name (symbol-name feature-name)))
254 (if (string-match "@[^@/*]+\\(/[^@/*]+\\)*$" name)
255 (intern (substring name 0 (car (last (match-data) 2)))))))
257 (defun char-feature-name-domain (feature-name)
258 (let ((name (symbol-name feature-name)))
259 (if (string-match "@[^@/*]+\\(/[^@/*]+\\)*$" name)
260 (intern (substring name (1+ (match-beginning 0)))))))
262 (defun char-feature-name-sans-versions (feature)
263 (let ((feature-name (symbol-name feature)))
264 (if (string-match "[@/]\\$rev=latest$" feature-name)
265 (intern (substring feature-name 0 (match-beginning 0)))
268 (defun est-object-genre (object)
269 (if (characterp object)
271 (concord-object-genre object)))
273 (defun www-get-feature-value (object feature)
274 (let ((latest-feature (char-feature-name-at-domain feature '$rev=latest)))
277 (mount-char-attribute-table latest-feature)
278 (or (char-feature object latest-feature)
279 (char-feature object feature))
282 (or (condition-case nil
283 (concord-object-get object latest-feature)
286 (concord-object-get object feature)
290 (defun get-previous-code-point (ccs code)
291 (let ((chars (charset-chars ccs))
292 (dim (charset-dimension ccs))
294 mask byte-min byte-max
317 (setq bytes (make-vector dim 0))
319 (aset bytes i (logand (lsh code (* i -8)) mask))
322 (while (and (< i dim)
324 (aset bytes i (1- (aref bytes i)))
325 (< (aref bytes i) byte-min)))
326 (aset bytes i byte-max)
329 (setq dest (aref bytes 0)
332 (setq dest (logior dest (lsh (aref bytes i) (* i 8)))
336 (defun get-next-code-point (ccs code)
337 (let ((chars (charset-chars ccs))
338 (dim (charset-dimension ccs))
340 mask byte-min byte-max
363 (setq bytes (make-vector dim 0))
365 (aset bytes i (logand (lsh code (* i -8)) mask))
368 (while (and (< i dim)
370 (aset bytes i (1+ (aref bytes i)))
371 (> (aref bytes i) byte-max)))
372 (aset bytes i byte-min)
375 (setq dest (aref bytes 0)
378 (setq dest (logior dest (lsh (aref bytes i) (* i 8)))
382 (defun find-previous-defined-code-point (ccs code)
383 (let ((i (get-previous-code-point ccs code))
386 ((eq ccs '=jis-x0208)
387 (setq ccs '=jis-x0208@1990))
388 ((eq ccs '=jis-x0213-1)
389 (setq ccs '=jis-x0213-1@2004)))
392 (null (setq char (decode-char ccs i
393 (unless (eq ccs '=ucs)
395 (setq i (get-previous-code-point ccs i)))
398 (defun find-next-defined-code-point (ccs code)
399 (let ((i (get-next-code-point ccs code))
401 (setq max (+ code 1000))
403 ((eq ccs '=jis-x0208)
404 (setq ccs '=jis-x0208@1990))
405 ((eq ccs '=jis-x0213-1)
406 (setq ccs '=jis-x0213-1@2004)))
409 (null (setq char (decode-char ccs i
410 (unless (eq ccs '=ucs)
412 (setq i (get-next-code-point ccs i)))
416 ;;; @ URI representation
419 ;; (defun est-uri-decode-feature-name-body (uri-feature)
420 ;; (let ((len (length uri-feature))
427 ;; (if (eq (aref uri-feature i) ?\.)
428 ;; (if (and (< (+ i 2) len)
429 ;; (eq (aref uri-feature (+ i 2)) ?\.))
432 ;; ((eq (setq ch (aref uri-feature (1+ i))) ?\.)
439 ;; (substring uri-feature i (+ i 3))
445 ;; (char-to-string (aref uri-feature i))
446 ;; (setq i (1+ i)))))))
449 ;; (defun est-uri-encode-feature-name-body (feature)
450 ;; (mapconcat (lambda (c)
457 ;; (t (char-to-string c))))
460 (defun www-uri-decode-feature-name (uri-feature)
462 (setq uri-feature (decode-uri-string uri-feature 'utf-8-mcs-er))
464 ((string-match "^from\\." uri-feature)
465 (intern (format "<-%s"
466 (est-uri-decode-feature-name-body
467 (substring uri-feature (match-end 0)))))
469 ((string-match "^to\\." uri-feature)
470 (intern (format "->%s"
471 (est-uri-decode-feature-name-body
472 (substring uri-feature (match-end 0)))))
474 ((string-match "^rep\\." uri-feature)
475 (intern (format "=%s"
476 (est-uri-decode-feature-name-body
477 (substring uri-feature (match-end 0)))))
479 ((string-match "^rep[2i]\\." uri-feature)
480 (intern (format "===%s"
481 (est-uri-decode-feature-name-body
482 (substring uri-feature (match-end 0)))))
484 ((string-match "^g\\." uri-feature)
485 (intern (format "=>>%s"
486 (est-uri-decode-feature-name-body
487 (substring uri-feature (match-end 0)))))
489 ((string-match "^g[i2]\\." uri-feature)
490 (intern (format "==%s"
491 (est-uri-decode-feature-name-body
492 (substring uri-feature (match-end 0)))))
494 ((string-match "^gi\\([0-9]+\\)\\." uri-feature)
495 (intern (format "=>>%s%s"
496 (make-string (string-to-int
497 (match-string 1 uri-feature))
499 (est-uri-decode-feature-name-body
500 (substring uri-feature (match-end 0)))))
502 ((string-match "^o\\." uri-feature)
503 (intern (format "=+>%s"
504 (est-uri-decode-feature-name-body
505 (substring uri-feature (match-end 0)))))
507 ((string-match "^a\\." uri-feature)
508 (intern (format "=>%s"
509 (est-uri-decode-feature-name-body
510 (substring uri-feature (match-end 0)))))
512 ((string-match "^a\\([0-9]+\\)\\." uri-feature)
513 (intern (format "%s>%s"
514 (make-string (string-to-int
515 (match-string 1 uri-feature))
517 (est-uri-decode-feature-name-body
518 (substring uri-feature (match-end 0)))))
520 ((and (setq uri-feature (est-uri-decode-feature-name-body uri-feature))
521 (setq feature (intern (format "=>%s" uri-feature)))
522 (find-charset feature))
524 ((and (setq feature (intern (format "=>>%s" uri-feature)))
525 (find-charset feature))
527 ((and (setq feature (intern (format "=>>>%s" uri-feature)))
528 (find-charset feature))
530 ((and (setq feature (intern (format "=%s" uri-feature)))
531 (find-charset feature))
533 (t (intern uri-feature)))))
535 (defun www-uri-encode-feature-name (feature-name)
536 (setq feature-name (symbol-name feature-name))
538 ((string-match "^=\\+>\\([^=>]+\\)" feature-name)
540 (est-uri-encode-feature-name-body
541 (substring feature-name (match-beginning 1))))
543 ((string-match "^=\\([^=>]+\\)" feature-name)
545 (est-uri-encode-feature-name-body
546 (substring feature-name (match-beginning 1))))
548 ((string-match "^==\\([^=>]+\\)" feature-name)
550 (est-uri-encode-feature-name-body
551 (substring feature-name (match-beginning 1))))
553 ((string-match "^===\\([^=>]+\\)" feature-name)
555 (est-uri-encode-feature-name-body
556 (substring feature-name (match-beginning 1))))
558 ((string-match "^=>>\\([^=>]+\\)" feature-name)
560 (est-uri-encode-feature-name-body
561 (substring feature-name (match-beginning 1))))
563 ((string-match "^=>>>\\([^=>]+\\)" feature-name)
565 (est-uri-encode-feature-name-body
566 (substring feature-name (match-beginning 1))))
568 ((string-match "^=>>\\(>+\\)" feature-name)
570 (length (match-string 1 feature-name))
571 (est-uri-encode-feature-name-body
572 (substring feature-name (match-end 1))))
574 ((string-match "^=>\\([^=>]+\\)" feature-name)
576 (est-uri-encode-feature-name-body
577 (substring feature-name (match-beginning 1))))
579 ((string-match "^\\(=+\\)>" feature-name)
581 (length (match-string 1 feature-name))
582 (est-uri-encode-feature-name-body
583 (substring feature-name (match-end 0))))
585 ((string-match "^->" feature-name)
587 (est-uri-encode-feature-name-body
588 (substring feature-name (match-end 0))))
590 ((string-match "^<-" feature-name)
592 (est-uri-encode-feature-name-body
593 (substring feature-name (match-end 0))))
595 (t (est-uri-encode-feature-name-body feature-name))))
597 (defun www-uri-make-feature-name-url (uri-genre uri-feature-name uri-object)
598 (if est-hide-cgi-mode
599 (format "../feature/%s&%s/%s"
600 uri-feature-name uri-genre uri-object)
601 (format "%s?feature=%s&%s=%s"
602 chise-wiki-view-url uri-feature-name uri-genre uri-object)))
604 (defun www-uri-decode-object (genre char-rep)
607 ((string-match (if est-hide-cgi-mode
608 "\\(%3D\\|=\\|%3A\\|:\\)"
609 "\\(%3A\\|:\\)") char-rep)
610 (setq ccs (substring char-rep 0 (match-beginning 0))
611 cpos (substring char-rep (match-end 0)))
612 (setq ccs (www-uri-decode-feature-name ccs))
613 (setq cpos (est-uri-decode-feature-name-body cpos))
615 ((string-match "^0x" cpos)
617 (string-to-number (substring cpos (match-end 0)) 16))
620 (setq cpos (car (read-from-string
622 cpos file-name-coding-system))))
624 (if (and (eq genre 'character)
626 (decode-char ccs cpos)
627 (concord-decode-object ccs cpos genre))
630 (setq char-rep (decode-uri-string char-rep 'utf-8-mcs-er))
632 ((eq genre 'character)
633 (when (= (length char-rep) 1)
637 (concord-decode-object
638 '=id (www-uri-decode-feature-name char-rep) 'feature)
641 (concord-decode-object
642 '=id (car (read-from-string char-rep)) genre)
645 (defun www-uri-encode-object (object)
646 (if (characterp object)
647 (if (encode-char object '=ucs)
650 (format "%%%02X" byte))
651 (encode-coding-string (char-to-string object) 'utf-8-mcs-er)
653 (let ((ccs-list est-coded-charset-priority-list)
656 (setq ccs (pop ccs-list))
657 (not (setq ret (encode-char object ccs 'defined-only)))))
659 (format (if est-hide-cgi-mode
662 (www-uri-encode-feature-name ccs)
664 ((and (setq ccs (car (split-char object)))
665 (setq ret (encode-char object ccs)))
666 (format (if est-hide-cgi-mode
669 (www-uri-encode-feature-name ccs)
672 (format (if est-hide-cgi-mode
673 "system-char-id=0x%X"
674 "system-char-id:0x%X")
675 (encode-char object 'system-char-id))
677 (format (if est-hide-cgi-mode
680 (est-uri-encode-feature-name-body
681 (format "%s" (concord-object-id object))))))
683 (defun est-format-object (object &optional readable)
684 (if (characterp object)
685 (char-to-string object)
686 (let ((ret (or (if readable
687 (or (concord-object-get object 'name)
688 (concord-object-get object '=name)
689 (concord-object-get object 'title)))
690 (concord-object-id object))))
693 (defun www-uri-make-object-url (object &optional uri-object)
694 (if est-hide-cgi-mode
697 (est-object-genre object)
699 (www-uri-encode-object object)))
702 (est-object-genre object)
704 (www-uri-encode-object object)))))
707 ;;; @ Feature name presentation
710 (defun www-format-feature-name-default (feature-name)
714 (symbol-name feature-name)
718 (defun www-format-feature-name-as-metadata (feature-name &optional lang)
719 (let ((str (symbol-name feature-name))
722 ((string-match "\\*[^*]+$" str)
723 (setq base (substring str 0 (match-beginning 0))
724 meta (substring str (match-beginning 0)))
725 (concat (www-format-feature-name* (intern base) lang)
728 (www-format-feature-name-default feature-name)
731 (defun www-format-feature-name-as-rel-to (feature-name)
732 (concat "\u2192" (substring (symbol-name feature-name) 2)))
734 (defun www-format-feature-name-as-rel-from (feature-name)
735 (concat "\u2190" (substring (symbol-name feature-name) 2)))
737 (defun www-format-feature-name-as-CCS (feature-name)
740 (symbol-name feature-name)
742 (dest (upcase (pop rest))))
743 (when (string-match "^=+>*" dest)
744 (setq dest (concat (substring dest 0 (match-end 0))
746 (substring dest (match-end 0)))))
750 (setq dest (concat dest " " (upcase (pop rest)))))
751 (if (string-match "^[0-9]+$" (car rest))
752 (concat dest "-" (car rest))
753 (concat dest " " (upcase (car rest))))
757 (defun www-format-feature-name* (feature-name &optional lang)
758 (let (name fn parent ret)
761 (char-feature-property
763 (intern (format "name@%s" lang))))
764 (char-feature-property
765 feature-name 'name)))
766 ((and (setq name (symbol-name feature-name))
767 (string-match "\\*" name))
768 (www-format-feature-name-as-metadata feature-name lang))
770 (setq fn feature-name)
771 (while (and (setq parent (char-feature-name-parent fn))
774 (char-feature-property
776 (intern (format "name@%s" lang))))
777 (char-feature-property
782 (concat ret (substring (symbol-name feature-name)
783 (length (symbol-name parent)))))
784 ((find-charset feature-name)
785 (www-format-feature-name-as-CCS feature-name))
786 ((string-match "^\\(->\\)" name)
787 (www-format-feature-name-as-rel-to feature-name))
788 ((string-match "^\\(<-\\)" name)
789 (www-format-feature-name-as-rel-from feature-name))
791 (www-format-feature-name-default feature-name)
795 (defun www-format-feature-name (feature-name &optional lang)
796 (www-format-encode-string
797 (www-format-feature-name* feature-name lang)))
803 (defvar www-format-char-img-style "vertical-align:bottom;")
805 (defun www-format-encode-string (string &optional without-tags as-body)
808 (let (plane code subcode start end char variants ret rret)
810 (goto-char (point-min))
811 (while (search-forward "&" nil t)
812 (replace-match "&" nil t)))
813 (goto-char (point-min))
814 (while (search-forward "<" nil t)
815 (replace-match "<" nil t))
816 (goto-char (point-min))
817 (while (search-forward ">" nil t)
818 (replace-match ">" nil t))
820 (encode-coding-region (point-min)(point-max) 'utf-8-mcs-er)
821 (let ((coded-charset-entity-reference-alist
825 '(=hanyo-denshi/ja "HD-JA-" 4 X)
826 '(=hanyo-denshi/jb "HD-JB-" 4 X)
827 '(=hanyo-denshi/jc "HD-JC-" 4 X)
828 '(=hanyo-denshi/jd "HD-JD-" 4 X)
829 '(=hanyo-denshi/ft "HD-FT-" 4 X)
830 '(=hanyo-denshi/ia "HD-IA-" 4 X)
831 '(=hanyo-denshi/ib "HD-IB-" 4 X)
832 '(=hanyo-denshi/hg "HD-HG-" 4 X)
833 '(=hanyo-denshi/ip "HD-IP-" 4 X)
834 '(=hanyo-denshi/jt "HD-JT-" 4 X)
835 '(=hanyo-denshi/ks "HD-KS-" 6 d)
836 '(=>>hanyo-denshi/ja "G-HD-JA-" 4 X)
837 '(=>>hanyo-denshi/jb "G-HD-JB-" 4 X)
838 '(=>>hanyo-denshi/jc "G-HD-JC-" 4 X)
839 '(=>>hanyo-denshi/jd "G-HD-JD-" 4 X)
840 '(=>>hanyo-denshi/ft "G-HD-FT-" 4 X)
841 '(=>>hanyo-denshi/ia "G-HD-IA-" 4 X)
842 '(=>>hanyo-denshi/ib "G-HD-IB-" 4 X)
843 '(=>>hanyo-denshi/hg "G-HD-HG-" 4 X)
844 '(=>>hanyo-denshi/ip "G-HD-IP-" 4 X)
845 '(=>>hanyo-denshi/jt "G-HD-JT-" 4 X)
846 '(=>>hanyo-denshi/ks "G-HD-KS-" 6 d)
848 '(==hanyo-denshi/ja "g2-HD-JA-" 4 X)
849 '(==hanyo-denshi/jb "g2-HD-JB-" 4 X)
850 '(==hanyo-denshi/jc "g2-HD-JC-" 4 X)
851 '(==hanyo-denshi/jd "g2-HD-JD-" 4 X)
852 '(==hanyo-denshi/ft "g2-HD-FT-" 4 X)
853 '(==hanyo-denshi/ia "g2-HD-IA-" 4 X)
854 '(==hanyo-denshi/ib "g2-HD-IB-" 4 X)
855 '(==hanyo-denshi/hg "g2-HD-HG-" 4 X)
856 '(==hanyo-denshi/ip "g2-HD-IP-" 4 X)
857 '(==hanyo-denshi/jt "g2-HD-JT-" 4 X)
858 '(==hanyo-denshi/ks "g2-HD-KS-" 6 d)
859 '(==daijiten "g2-DJT-" 5 d)
860 '(=cns11643-1 "C1-" 4 X)
861 '(=cns11643-2 "C2-" 4 X)
862 '(=cns11643-3 "C3-" 4 X)
863 '(=cns11643-4 "C4-" 4 X)
864 '(=cns11643-5 "C5-" 4 X)
865 '(=cns11643-6 "C6-" 4 X)
866 '(=cns11643-7 "C7-" 4 X)
867 '(=adobe-japan1-6 "AJ1-" 5 d)
868 '(=big5-cdp "CDP-" 4 X)
869 '(=>big5-cdp "A-CDP-" 4 X)
871 '(=gb12345 "G1-" 4 X)
872 '(=jis-x0208@1990 "J90-" 4 X)
873 '(=jis-x0212 "JSP-" 4 X)
875 '(=jis-x0208@1997 "J97-" 4 X)
876 '(=jis-x0208@1978 "J78-" 4 X)
877 '(=jis-x0208@1983 "J83-" 4 X)
878 '(=ruimoku-v6 "RUI6-" 4 X)
879 '(=zinbun-oracle "ZOB-" 4 d)
880 '(=daijiten "DJT-" 5 d)
881 '(=jef-china3 "JC3-" 4 X)
882 '(=ucs@unicode "UU+" 4 X)
883 '(=ucs@JP/hanazono "hanaJU+" 4 X)
884 '(==cns11643-1 "R-C1-" 4 X)
885 '(==cns11643-2 "R-C2-" 4 X)
886 '(==cns11643-3 "R-C3-" 4 X)
887 '(==cns11643-4 "R-C4-" 4 X)
888 '(==cns11643-5 "R-C5-" 4 X)
889 '(==cns11643-6 "R-C6-" 4 X)
890 '(==cns11643-7 "R-C7-" 4 X)
891 '(=hanziku-1 "HZK01-" 4 X)
892 '(=hanziku-2 "HZK02-" 4 X)
893 '(=hanziku-3 "HZK03-" 4 X)
894 '(=hanziku-4 "HZK04-" 4 X)
895 '(=hanziku-5 "HZK05-" 4 X)
896 '(=hanziku-6 "HZK06-" 4 X)
897 '(=hanziku-7 "HZK07-" 4 X)
898 '(=hanziku-8 "HZK08-" 4 X)
899 '(=hanziku-9 "HZK09-" 4 X)
900 '(=hanziku-10 "HZK10-" 4 X)
901 '(=hanziku-11 "HZK11-" 4 X)
902 '(=hanziku-12 "HZK12-" 4 X)
903 '(==>daijiten "A2-DJT-" 5 d)
906 '(=daikanwa "M-" 5 d)
907 coded-charset-entity-reference-alist)))
908 (encode-coding-region (point-min)(point-max) 'utf-8-mcs-er)
910 (goto-char (point-min))
911 (while (re-search-forward "&\\(A-\\|G-\\|g2-\\|R-\\)?CB\\([0-9]+\\);" nil t)
912 (setq code (string-to-int (match-string 2)))
914 (format "<img alt=\"CB%05d\" src=\"%s/cb-gaiji/%02d/CB%05d.gif\"
917 chise-wiki-bitmap-glyphs-url
919 www-format-char-img-style)
922 (goto-char (point-min))
923 (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)
924 (setq plane (match-string 2)
925 code (string-to-int (match-string 3) 16))
927 (format "<img alt=\"J%s-%04X\" src=\"%s/JIS-%s/%02d-%02d.gif\"
930 chise-wiki-bitmap-glyphs-url
933 (- (logand code 255) 32)
934 www-format-char-img-style)
937 (goto-char (point-min))
938 (while (re-search-forward "&\\(o-\\|G-\\|g2-\\|R-\\)?J0-\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\\);" nil t)
939 (setq code (string-to-int (match-string 2) 16))
941 (format "<img alt=\"J0-%04X\" src=\"%s/JIS-90/%02d-%02d.gif\"
944 chise-wiki-bitmap-glyphs-url
946 (- (logand code 255) 32)
947 www-format-char-img-style)
950 (goto-char (point-min))
951 (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)
952 (setq plane (match-string 2)
953 code (string-to-int (match-string 3) 16))
955 (format "<img alt=\"HD-%s-%04X\" src=\"%s/IVD/HanyoDenshi/%s%02d%02d.png\"
958 chise-wiki-bitmap-glyphs-url
961 (- (logand code 255) 32)
962 www-format-char-img-style)
965 (goto-char (point-min))
966 (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)
967 (setq plane (match-string 2)
968 code (string-to-int (match-string 3) 16))
970 (format "<img alt=\"HD-%s-%04X\" src=\"%s/IVD/HanyoDenshi/%s%04X.png\"
973 chise-wiki-bitmap-glyphs-url
975 www-format-char-img-style)
978 (goto-char (point-min))
979 (while (re-search-forward "&\\(o-\\|G-\\|g2-\\|R-\\)?HD-KS-\\([0-9]+\\);" nil t)
980 (setq code (string-to-int (match-string 2)))
982 (format "<img alt=\"HD-KS%06d\" src=\"%s/IVD/HanyoDenshi/KS%06d.png\"
983 style=\"vertical-align:middle\">"
985 chise-wiki-bitmap-glyphs-url
987 www-format-char-img-style)
990 (goto-char (point-min))
991 (while (re-search-forward "&G\\([01]\\)-\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\\);" nil t)
992 (setq plane (string-to-int (match-string 1))
993 code (string-to-int (match-string 2) 16))
995 (format "<img alt=\"GB%d-%04X\" src=\"%s/GB%d/%02d-%02d.gif\"
998 chise-wiki-bitmap-glyphs-url
1000 (- (lsh code -8) 32)
1001 (- (logand code 255) 32)
1002 www-format-char-img-style)
1005 (goto-char (point-min))
1006 (while (re-search-forward "&\\(R-\\)?C\\([1-7]\\)-\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\\);" nil t)
1007 (setq plane (string-to-int (match-string 2))
1008 code (string-to-int (match-string 3) 16))
1010 (format "<img alt=\"CNS%d-%04X\" src=\"%s/CNS%d/%04X.gif\"
1013 chise-wiki-bitmap-glyphs-url
1015 www-format-char-img-style)
1018 (goto-char (point-min))
1019 (while (re-search-forward "&\\(R-\\)?JC3-\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\\);" nil t)
1020 (setq code (string-to-int (match-string 2) 16))
1022 (format "<img alt=\"JC3-%04X\" src=\"http://kanji.zinbun.kyoto-u.ac.jp/db/CHINA3/Gaiji/%04x.gif\">"
1026 (goto-char (point-min))
1027 (while (re-search-forward "&\\(A-\\)?ZOB-\\([0-9]+\\);" nil t)
1028 (setq code (string-to-int (match-string 2)))
1030 (format "<img alt=\"ZOB-%04d\" src=\"%s/ZOB-1968/%04d.png\"
1031 style=\"vertical-align:middle\">"
1033 chise-wiki-bitmap-glyphs-url
1035 www-format-char-img-style)
1038 (goto-char (point-min))
1039 (while (re-search-forward "&\\(A2-\\|g2-\\|R-\\)?DJT-\\([0-9]+\\);" nil t)
1040 (setq code (string-to-int (match-string 2)))
1042 (format "<img alt=\"DJT-%05d\" src=\"%s/%05d.png\"
1043 style=\"vertical-align:middle; width: auto; max-height: 60px\">"
1045 chise-wiki-daijiten-bitmap-glyphs-url
1047 www-format-char-img-style)
1050 (goto-char (point-min))
1051 (while (re-search-forward "&SW-JIGUGE\\([45]?\\)-\\([0-9]+\\);" nil t)
1052 (setq subcode (match-string 1)
1053 code (string-to-int (match-string 2)))
1055 (if (string= subcode "")
1059 (format "<div class=\"tooltip\"><img alt=\"SW-JIGUGE%s-%05d\" src=\"%s/ShuoWen/Jiguge%s/%05d.png\"
1060 style=\"vertical-align:middle; width: auto; max-height: 80px\"><span
1061 class=\"tooltiptext\">%s</span></div>"
1063 chise-wiki-bitmap-glyphs-url
1065 (charset-description
1066 (if (string= subcode "")
1068 (intern (format "===shuowen-jiguge%s" subcode)))))
1071 (goto-char (point-min))
1072 (while (re-search-forward "&HNG\\([0-9]+\\)-\\([0-9][0-9][0-9][0-9]\\)\\([0-9]\\);" nil t)
1073 (setq plane (match-string 1)
1074 code (string-to-int (match-string 2))
1075 subcode (string-to-int (match-string 3)))
1079 (char-to-string (decode-char 'ascii (+ 96 subcode)))))
1082 "<div class=\"tooltip\"><img alt=\"HNG%s-%04d%s\" src=\"%s/%s/%04d%s.png\" style=\"
1083 vertical-align:middle; width: auto; max-height: 60px\"><span
1084 class=\"tooltiptext\">%s</span></div>"
1086 chise-wiki-hng-bitmap-glyphs-url
1088 (charset-description
1089 (car (find (format "HNG%s-" plane)
1090 coded-charset-entity-reference-alist
1091 :test (lambda (key cell)
1092 (string= key (nth 1 cell))))))
1096 (goto-char (point-min))
1097 (while (re-search-forward "&\\(o-\\|G-\\|g2-\\|R-\\)?AJ1-\\([0-9]+\\);" nil t)
1098 (setq code (string-to-int (match-string 2)))
1100 (format "<img alt=\"AJ1-%05d\" src=\"%s/IVD/AdobeJapan1/CID+%d.png\"
1101 style=\"vertical-align:middle\">"
1103 chise-wiki-bitmap-glyphs-url
1105 www-format-char-img-style)
1108 (goto-char (point-min))
1109 (while (re-search-forward "&\\(A-\\|o-\\|G-\\|g2-\\|R-\\)?MJ\\([0-9]+\\);" nil t)
1110 (setq code (string-to-int (match-string 2)))
1112 (format "<img alt=\"MJ%06d\" src=\"http://mojikiban.ipa.go.jp/MJ%06d.png\"
1113 style=\"vertical-align:middle; width: 48px; height: 48px\">"
1116 www-format-char-img-style)
1119 (goto-char (point-min))
1120 (while (re-search-forward "&\\(o-\\|G-\\|g2-\\)?IU[+-]\\([0-9A-F]+\\);" nil t)
1121 (setq code (string-to-int (match-string 2) 16))
1123 (format "<img alt=\"u%04x\" src=\"http://glyphwiki.org/glyph/u%04x.100px.png\"
1124 style=\"vertical-align:middle; width: 48px; height: 48px\">"
1127 www-format-char-img-style)
1130 (goto-char (point-min))
1131 (while (re-search-forward "&A-\\(comp\\|cgn\\)U[+-]\\([0-9A-F]+\\);" nil t)
1132 (setq code (string-to-int (match-string 2) 16))
1134 (format "<img alt=\"u%04x\" src=\"http://glyphwiki.org/glyph/u%04x.100px.png\"
1135 style=\"vertical-align:middle; width: 48px; height: 48px\">"
1138 www-format-char-img-style)
1141 (goto-char (point-min))
1142 (while (re-search-forward
1143 "&\\(A-\\|g2-\\)?U-i\\([0-9]+\\)\\+\\([0-9A-F]+\\);"
1145 (setq plane (string-to-int (match-string 2))
1146 code (string-to-int (match-string 3) 16))
1148 (format "<img alt=\"u%04x-itaiji-%03d\" src=\"http://glyphwiki.org/glyph/u%04x-itaiji-%03d.100px.png\"
1149 style=\"vertical-align:middle; width: 48px; height: 48px\">"
1154 www-format-char-img-style)
1157 (goto-char (point-min))
1158 (while (re-search-forward "&A-IWDSU\\+\\([0-9A-F]+\\);" nil t)
1159 (setq code (string-to-int (match-string 1) 16))
1161 (format "<img alt=\"A-IWDSU+%04x\" src=\"http://glyphwiki.org/glyph/u%04x.100px.png\"
1162 style=\"vertical-align:middle; width: 48px; height: 48px\">"
1165 www-format-char-img-style)
1168 (goto-char (point-min))
1169 (while (re-search-forward
1170 "&\\(A-\\)?CDP-i\\([0-9]+\\)-\\([0-9A-F]+\\);"
1172 (setq plane (string-to-int (match-string 2))
1173 code (string-to-int (match-string 3) 16))
1175 (format "<img alt=\"cdp-%04x-itaiji-%03d\" src=\"http://glyphwiki.org/glyph/cdp-%04x-itaiji-%03d.100px.png\"
1176 style=\"vertical-align:middle; width: 48px; height: 48px\">"
1181 www-format-char-img-style)
1184 (goto-char (point-min))
1185 (while (re-search-forward "&\\(g2-\\)?U-v\\([0-9]+\\)\\+\\([0-9A-F]+\\);" nil t)
1186 (setq plane (string-to-int (match-string 2))
1187 code (string-to-int (match-string 3) 16))
1189 (format "<img alt=\"u%04x-var-%03d\" src=\"http://glyphwiki.org/glyph/u%04x-var-%03d.100px.png\"
1190 style=\"vertical-align:middle; width: 48px; height: 48px\">"
1195 www-format-char-img-style)
1198 (goto-char (point-min))
1199 (while (re-search-forward "&\\(A-\\|G-\\|R-\\|g2-\\)?GT-\\([0-9]+\\);" nil t)
1200 (setq code (string-to-int (match-string 2)))
1202 (format "<img alt=\"GT-%05d\" src=\"%s?char=GT-%05d\"
1205 chise-wiki-glyph-cgi-url
1207 www-format-char-img-style)
1210 (goto-char (point-min))
1211 (while (re-search-forward "&\\(A-\\|G-\\|g2-\\)?GT-K\\([0-9]+\\);" nil t)
1212 (setq code (string-to-int (match-string 2)))
1214 (format "<img alt=\"GT-K%05d\" src=\"%s?char=GT-K%05d\"
1217 chise-wiki-glyph-cgi-url
1219 www-format-char-img-style)
1222 (goto-char (point-min))
1223 (while (re-search-forward "&B-\\([0-9A-F]+\\);" nil t)
1224 (setq code (string-to-int (match-string 1) 16))
1226 (format "<img alt=\"B-%04X\" src=\"%s?char=B-%04X\"
1229 chise-wiki-glyph-cgi-url
1231 www-format-char-img-style)
1234 (goto-char (point-min))
1235 (while (re-search-forward
1236 "&\\(A-\\|G-\\|g2-\\|R-\\)?CDP-\\([0-9A-F]+\\);" nil t)
1237 (setq code (string-to-int (match-string 2) 16))
1239 (format "<img alt=\"CDP-%04X\" src=\"%s?char=CDP-%04X\"
1242 chise-wiki-glyph-cgi-url
1244 www-format-char-img-style)
1247 (goto-char (point-min))
1248 (while (re-search-forward
1249 "&\\(I-\\)?HZK\\(0[1-9]\\|1[0-2]\\)-\\([0-9A-F]+\\);" nil t)
1250 (setq plane (match-string 2)
1251 code (string-to-int (match-string 3) 16))
1253 (format "<img alt=\"HZK%s-%04X\" src=\"%s?char=HZK%s-%04X\"
1257 chise-wiki-glyph-cgi-url
1260 www-format-char-img-style)
1263 (goto-char (point-min))
1264 (while (re-search-forward "&\\(A-\\|G-\\|g2-\\|R-\\)?RUI6-\\([0-9A-F]+\\);" nil t)
1265 (setq code (string-to-int (match-string 2) 16))
1267 (format "<img alt=\"RUI6-%04X\" src=\"%s?char=RUI6-%04X\"
1268 style=\"vertical-align:middle\">"
1270 chise-wiki-glyph-cgi-url
1272 www-format-char-img-style)
1275 (goto-char (point-min))
1276 (while (re-search-forward "&hanaJU\\+\\([0-9A-F]+\\);" nil t)
1277 (setq code (string-to-int (match-string 1) 16))
1279 (format "<img alt=\"hanaJU+%04X\" src=\"%s?char=hana-JU+%04X\"
1280 style=\"vertical-align:middle\">"
1282 chise-wiki-glyph-cgi-url
1284 www-format-char-img-style)
1287 (goto-char (point-min))
1288 (while (re-search-forward "&\\(A-\\|G-\\|g2-\\|R-\\)?\\(UU\\+\\|U-\\)\\([0-9A-F]+\\);" nil t)
1289 (setq code (string-to-int (match-string 3) 16))
1291 (format "<img alt=\"UU+%04X\" src=\"http://www.unicode.org/cgi-bin/refglyph?24-%04X\"
1292 style=\"vertical-align:middle\">"
1295 www-format-char-img-style)
1298 (goto-char (point-min))
1299 (while (re-search-forward "&MCS-\\([0-9A-F]+\\);" nil t)
1300 (setq code (string-to-int (match-string 1) 16))
1301 (setq start (match-beginning 0)
1303 (setq char (decode-char 'system-char-id code))
1305 ((and (setq variants
1306 (or (www-get-feature-value char '->subsumptive)
1307 (www-get-feature-value char '->denotational)))
1309 (if (characterp variants)
1310 (setq variants (list variants)))
1311 (while (and variants
1312 (setq ret (www-format-encode-string
1313 (char-to-string (car variants))))
1314 (string-match "&MCS-\\([0-9A-F]+\\);" ret))
1315 (setq variants (cdr variants)))
1317 (unless (string-match "&MCS-\\([0-9A-F]+\\);" ret)
1319 (delete-region start end)
1322 ((setq ret (or (www-get-feature-value char 'ideographic-combination)
1323 (www-get-feature-value char 'ideographic-structure)))
1328 (if (characterp (setq rret (find-char ch)))
1331 (www-format-encode-string
1332 (char-to-string ch) without-tags)
1333 (www-format-encode-string
1334 (format "%S" ch) without-tags)))
1338 (delete-region start end)
1342 ;; (goto-char (point-min))
1343 ;; (while (search-forward ">-" nil t)
1344 ;; (replace-match "&GT-" t 'literal))
1347 (defun www-html-display-text (text)
1351 (goto-char (point-min))
1352 (while (search-forward "<" nil t)
1353 (replace-match "<" nil t))
1354 (goto-char (point-min))
1355 (while (search-forward ">" nil t)
1356 (replace-match ">" nil t))
1357 (goto-char (point-min))
1358 (while (re-search-forward "\\[\\[\\([^]|[]+\\)|\\([^][]+\\)\\]\\]" nil t)
1360 (format "<a href=\"%s\">%s</a>"
1364 (encode-coding-region (point-min)(point-max) 'utf-8-mcs-er)
1365 (goto-char (point-min))
1366 (while (search-forward ">-" nil t)
1367 (replace-match "&GT-" nil t))
1370 (defun www-html-display-paragraph (text)
1372 (www-html-display-text text)
1379 (defvar coded-charset-GlyphWiki-id-alist
1380 '((===adobe-japan1-0 "aj1-" 5 d nil)
1381 (===adobe-japan1-1 "aj1-" 5 d nil)
1382 (===adobe-japan1-2 "aj1-" 5 d nil)
1383 (===adobe-japan1-3 "aj1-" 5 d nil)
1384 (===adobe-japan1-4 "aj1-" 5 d nil)
1385 (===adobe-japan1-5 "aj1-" 5 d nil)
1386 (===adobe-japan1-6 "aj1-" 5 d nil)
1387 (===ucs@jis "u" 4 x nil)
1388 (===daikanwa "dkw-" 5 d nil)
1389 (===ucs@ks "u" 4 x "-k")
1390 (==ucs-itaiji-005 "u" 4 x "-itaiji-005")
1391 (=ucs-var-001 "u" 4 x "-var-001")
1392 (=ucs-var-002 "u" 4 x "-var-002")
1393 (=ucs-var-003 "u" 4 x "-var-003")
1394 (=ucs-var-004 "u" 4 x "-var-004")
1395 (=ucs-itaiji-001 "u" 4 x "-itaiji-001")
1396 (=ucs-itaiji-002 "u" 4 x "-itaiji-002")
1397 (=ucs-itaiji-003 "u" 4 x "-itaiji-003")
1398 (=ucs-itaiji-084 "u" 4 x "-itaiji-084")
1399 (=>ucs-itaiji-001 "u" 4 x "-itaiji-001")
1400 (=>ucs-itaiji-006 "u" 4 x "-itaiji-006")
1401 (==adobe-japan1-0 "aj1-" 5 d nil)
1402 (==adobe-japan1-1 "aj1-" 5 d nil)
1403 (==adobe-japan1-2 "aj1-" 5 d nil)
1404 (==adobe-japan1-3 "aj1-" 5 d nil)
1405 (==adobe-japan1-4 "aj1-" 5 d nil)
1406 (==adobe-japan1-5 "aj1-" 5 d nil)
1407 (==adobe-japan1-6 "aj1-" 5 d nil)
1408 (==ucs@jis "u" 4 x nil)
1409 (==ucs@iso "u" 4 x nil)
1410 (==ucs@cns "u" 4 x "-t")
1411 (==ucs@unicode "u" 4 x "-us")
1412 (==daikanwa "dkw-" 5 d nil)
1413 (==ucs@ks "u" 4 x "-k")
1414 (==jis-x0208@1978 "j78-" 4 x nil)
1415 (==jis-x0208 "j90-" 4 x nil)
1416 (==jis-x0208@1990 "j90-" 4 x nil)
1417 (==jis-x0208@1983 "j83-" 4 x nil)
1418 (==cbeta "cbeta-" 5 d nil)
1419 (=>>hanyo-denshi/ks "koseki-" 6 d nil)
1420 (=>>jis-x0208@1978 "j78-" 4 x nil)
1421 (=>>big5-cdp "cdp-" 4 x nil)
1422 (=>>adobe-japan1-0 "aj1-" 5 d nil)
1423 (=>>adobe-japan1-1 "aj1-" 5 d nil)
1424 (=>>adobe-japan1-2 "aj1-" 5 d nil)
1425 (=>>adobe-japan1-3 "aj1-" 5 d nil)
1426 (=>>adobe-japan1-4 "aj1-" 5 d nil)
1427 (=>>adobe-japan1-5 "aj1-" 5 d nil)
1428 (=>>adobe-japan1-6 "aj1-" 5 d nil)
1429 (=>>jis-x0208 "j90-" 4 x nil)
1430 (=>>jis-x0208@1990 "j90-" 4 x nil)
1431 (=>>jis-x0208@1983 "j83-" 4 x nil)
1432 (=>>daikanwa "dkw-" 5 d nil)
1433 (=adobe-japan1-0 "aj1-" 5 d nil)
1434 (=adobe-japan1-1 "aj1-" 5 d nil)
1435 (=adobe-japan1-2 "aj1-" 5 d nil)
1436 (=adobe-japan1-3 "aj1-" 5 d nil)
1437 (=adobe-japan1-4 "aj1-" 5 d nil)
1438 (=adobe-japan1-5 "aj1-" 5 d nil)
1439 (=adobe-japan1-6 "aj1-" 5 d nil)
1440 (=decomposition@cid)
1441 (=decomposition@hanyo-denshi)
1442 (=hanyo-denshi/ks "koseki-" 6 d nil)
1443 (=koseki "koseki-" 6 d nil)
1444 (=ucs@jis "u" 4 x nil)
1445 (=ucs@cns "u" 4 x "-t")
1446 (=ucs@ks "u" 4 x "-k")
1447 (=ucs@JP "u" 4 x nil)
1448 (=ucs@gb "u" 4 x "-g")
1449 (=ucs@iso "u" 4 x "-u")
1450 (=ucs@unicode "u" 4 x "-us")
1451 (=big5-cdp "cdp-" 4 x nil)
1452 (=>big5-cdp "cdp-" 4 x nil)
1453 (=cbeta "cbeta-" 5 d nil)
1454 (=big5-cdp-var-3 "cdp-" 4 x "-var-3")
1455 (=big5-cdp-var-5 "cdp-" 4 x "-var-5")
1456 (=big5-cdp-itaiji-001 "cdp-" 4 x "-itaiji-001")
1457 (=big5-cdp-itaiji-002 "cdp-" 4 x "-itaiji-002")
1458 (=>big5-cdp-itaiji-001 "cdp-" 4 x "-itaiji-001")
1459 (=jef-china3 "jc3-" 4 x nil)
1460 (=jis-x0212 "jsp-" 4 x nil)
1461 (=jis-x0213-1@2000 "jx1-2000-" 4 x nil)
1462 (=jis-x0213-1@2004 "jx1-2004-" 4 x nil)
1463 (=jis-x0213-2 "jx2-" 4 x nil)
1464 (=gt-k "gt-k" 5 d nil)
1465 (=jis-x0208@1978/1pr "j78-" 4 x nil)
1466 (=jis-x0208@1978/-4pr "j78-" 4 x nil)
1467 (=jis-x0208@1978 "j78-" 4 x nil)
1468 (=+>jis-x0208@1978 "j78-" 4 x nil)
1469 (=+>jis-x0208 "j90-" 4 x nil)
1470 (=+>jis-x0208@1990 "j90-" 4 x nil)
1471 (=+>jis-x0208@1983 "j83-" 4 x nil)
1473 (=big5 "b-" 4 x nil)
1474 (=daikanwa "dkw-" 5 d nil)
1476 (=ruimoku-v6 "rui6-" 4 x nil)
1477 (=>ruimoku-v6 "rui6-" 4 x nil)
1478 (=ks-x1001 "k0-" 4 x nil)
1479 (=cns11643-1 "c1-" 4 x nil)
1480 (=cns11643-2 "c2-" 4 x nil)
1481 (=cns11643-3 "c3-" 4 x nil)
1482 (=cns11643-4 "c4-" 4 x nil)
1483 (=cns11643-5 "c5-" 4 x nil)
1484 (=cns11643-6 "c6-" 4 x nil)
1485 (=cns11643-7 "c7-" 4 x nil)
1486 (=jis-x0208 "j90-" 4 x nil)
1487 (=jis-x0208@1990 "j90-" 4 x nil)
1488 (=jis-x0208@1983 "j83-" 4 x nil)
1491 (defun char-GlyphWiki-id (char)
1492 (let ((rest coded-charset-GlyphWiki-id-alist)
1495 (setq spec (pop rest))
1496 (null (setq ret (get-char-attribute char (car spec))))))
1500 (mapconcat #'char-GlyphWiki-id ret "-"))
1501 (and (memq (car spec) '(=ucs@unicode '=ucs@iso))
1503 ((and (or (encode-char char '=jis-x0208@1990)
1504 (encode-char char '=jis-x0212)
1505 (encode-char char '=jis-x0213-1)
1506 (encode-char char '=jis-x0213-2))
1507 (setq code (encode-char char '=ucs@jis)))
1508 (format "u%04x" code)
1510 ((and (or (encode-char char '=gb2312)
1511 (encode-char char '=gb12345))
1512 (setq code (encode-char char '=ucs@gb)))
1513 (format "u%04x-g" code)
1515 ((and (or (encode-char char '=cns11643-1)
1516 (encode-char char '=cns11643-2)
1517 (encode-char char '=cns11643-3)
1518 (encode-char char '=cns11643-4)
1519 (encode-char char '=cns11643-5)
1520 (encode-char char '=cns11643-6)
1521 (encode-char char '=cns11643-7))
1522 (setq code (encode-char char '=ucs@cns)))
1523 (format "u%04x-t" code)
1525 ((and (encode-char char '=ks-x1001)
1526 (setq code (encode-char char '=ucs@ks)))
1527 (format "u%04x-k" code)
1529 (format (format "%s%%0%d%s%s"
1533 (or (nth 4 spec) ""))
1540 (provide 'cwiki-common)
1542 ;;; cwiki-common.el ends here