1 ;; -*- coding: utf-8-mcs-er -*-
2 (require 'char-db-util)
3 ;; (require 'concord-images)
5 (setq file-name-coding-system 'utf-8-mcs-er)
7 (concord-assign-genre 'code-point "/usr/local/var/chise-ipld/db")
8 (concord-assign-genre 'coded-character "/usr/local/var/chise-ipld/db")
9 (concord-assign-genre 'glyph "/usr/local/var/chise-ipld/db")
11 (concord-assign-genre 'image-resource "/usr/local/var/photo/db")
12 (concord-assign-genre 'glyph-image "/usr/local/var/photo/db")
14 (concord-assign-genre 'creator@ruimoku "/usr/local/var/ruimoku/db")
15 (concord-assign-genre 'person-name@ruimoku "/usr/local/var/ruimoku/db")
17 (concord-assign-genre 'journal-volume@ruimoku "/usr/local/var/ruimoku/db")
18 (concord-assign-genre 'article@ruimoku "/usr/local/var/ruimoku/db")
19 (concord-assign-genre 'book@ruimoku "/usr/local/var/ruimoku/db")
21 (concord-assign-genre 'classification@ruimoku "/usr/local/var/ruimoku/db")
22 (concord-assign-genre 'region@ruimoku "/usr/local/var/ruimoku/db")
23 (concord-assign-genre 'era@ruimoku "/usr/local/var/ruimoku/db")
24 (concord-assign-genre 'period@ruimoku "/usr/local/var/ruimoku/db")
25 (concord-assign-genre 'journal@ruimoku "/usr/local/var/ruimoku/db")
26 (concord-assign-genre 'journal-name@ruimoku "/usr/local/var/ruimoku/db")
27 (concord-assign-genre 'publisher@ruimoku "/usr/local/var/ruimoku/db")
28 (concord-assign-genre 'publisher-name@ruimoku "/usr/local/var/ruimoku/db")
30 (mount-char-attribute-table '*instance@ruimoku/bibliography/title)
31 ;; (mount-char-attribute-table '*instance@ruimoku/bibliography/content*note)
33 (concord-assign-genre 'entry@zh-classical "/usr/local/var/kanbun/db")
34 ;; (concord-assign-genre 'morpheme-entry@zh-classical "/usr/local/var/kanbun/db")
35 (concord-assign-genre 'word-class@zh-classical "/usr/local/var/kanbun/db")
36 (concord-assign-genre 'morpheme@zh-classical "/usr/local/var/kanbun/db")
37 (concord-assign-genre 'sentence@zh-classical "/usr/local/var/kanbun/db")
38 ;; (concord-assign-genre 'sentence-entry@zh-classical "/usr/local/var/kanbun/db")
40 (mount-char-attribute-table '*instance@morpheme-entry/zh-classical)
42 (concord-assign-genre 'ud@zh-classical "/usr/local/var/kanbun/db")
45 (concord-assign-genre 'hng-card "/usr/local/var/hng-card/db")
47 (mount-char-attribute-table '->HNG)
48 (mount-char-attribute-table '<-HNG)
49 (mount-char-attribute-table '->HNG@CN/manuscript)
50 (mount-char-attribute-table '<-HNG@CN/manuscript)
51 (mount-char-attribute-table '->HNG@CN/printed)
52 (mount-char-attribute-table '<-HNG@CN/printed)
53 (mount-char-attribute-table '->HNG@JP/manuscript)
54 (mount-char-attribute-table '<-HNG@JP/manuscript)
55 (mount-char-attribute-table '->HNG@JP/printed)
56 (mount-char-attribute-table '<-HNG@JP/printed)
57 (mount-char-attribute-table '->HNG@KR)
58 (mount-char-attribute-table '<-HNG@KR)
59 (mount-char-attribute-table '->HNG@MISC)
60 (mount-char-attribute-table '<-HNG@MISC)
63 (defvar est-hide-cgi-mode nil)
64 (defvar est-view-url-prefix "..")
65 (defvar chise-wiki-view-url "view.cgi")
66 (defvar chise-wiki-edit-url "edit.cgi")
68 (defvar chise-wiki-bitmap-glyphs-url
69 "http://www.chise.org/glyphs")
71 (defvar chise-wiki-hng-bitmap-glyphs-url
72 "http://hng.chise.org/glyphs/HNG")
74 (defvar chise-wiki-glyph-cgi-url
75 "http://www.chise.org/chisewiki/glyph.cgi")
77 (defvar chise-wiki-displayed-features nil)
79 (defvar est-coded-charset-priority-list
81 =cns11643-1 =cns11643-2 =cns11643-3
82 =cns11643-4 =cns11643-5 =cns11643-6 =cns11643-7
84 =jis-x0208 =jis-x0208@1990
89 =jis-x0213-1@2000 =jis-x0213-1@2004
90 =jis-x0208@1983 =jis-x0208@1978
91 =zinbun-oracle =>zinbun-oracle
95 =>>>jis-x0208 =>>>jis-x0213-1 =>>>jis-x0213-2
96 =>>jis-x0208 =>>jis-x0213-1 =>>jis-x0213-2
98 =+>jis-x0208 =+>jis-x0213-1 =+>jis-x0213-2
101 =>jis-x0208 =>jis-x0213-1
103 =>ucs@iso =>ucs@unicode
104 =>ucs@jis =>ucs@cns =>ucs@ks
105 =+>ucs@iso =+>ucs@unicode
106 =>>ucs@iso =>>ucs@unicode
107 =>>ucs@jis =>>ucs@cns =>>ucs@ks
108 =>>>ucs@iso =>>>ucs@unicode
109 =>>>ucs@jis =>>>ucs@cns =>>>ucs@ks
150 ===cns11643-1 ===cns11643-2 ===cns11643-3
151 ===cns11643-4 ===cns11643-5 ===cns11643-6 ===cns11643-7
154 (defun decode-uri-string (string &optional coding-system)
155 (if (> (length string) 0)
159 (mapconcat (lambda (char)
162 (char-to-string char)))
164 (while (string-match "%\\([0-9A-F][0-9A-F]\\)" string i)
165 (setq dest (concat dest
166 (substring string i (match-beginning 0))
169 (string-to-int (match-string 1 string) 16))))
171 (decode-coding-string
172 (concat dest (substring string i))
175 (defun www-feature-type (feature-name)
176 (or (char-feature-property feature-name 'type)
177 (let ((str (symbol-name feature-name)))
179 ((string-match "\\*note\\(@[^*]+\\)?$" str)
181 ((string-match "\\*sources\\(@[^*]+\\)?$" str)
183 ((string-match "\\*" str)
185 ((string-match "^\\(->\\|<-\\)" str)
187 ((string-match "^ideographic-structure\\(@\\|$\\)" str)
191 (defun www-feature-format (feature-name)
192 (or (char-feature-property feature-name 'presentation-format)
193 (char-feature-property feature-name 'format)
195 (setq fn feature-name)
196 (while (and (setq parent (char-feature-name-parent fn))
198 (char-feature-property
202 '((name) " : " (value))))
204 (defun www-feature-value-format (feature-name)
205 (or (char-feature-property feature-name 'value-presentation-format)
206 (char-feature-property feature-name 'value-format)
208 (setq fn feature-name)
209 (while (and (setq parent (char-feature-name-parent fn))
211 (or (char-feature-property
212 parent 'value-presentation-format)
213 (char-feature-property
214 parent 'value-format)))))
217 (let ((type (www-feature-type feature-name)))
218 (cond ((eq type 'relation)
220 ((eq type 'structure)
221 'space-separated-ids)
225 (if (find-charset feature-name)
226 (if (and (= (charset-dimension feature-name) 2)
227 (= (charset-chars feature-name) 94))
229 " (" (decimal) ") <" (ku-ten) "> " (prev-char) (next-char))
230 '("0x" (HEX) " (" (decimal) ") " (prev-char) (next-char))))
233 (defun char-feature-name-at-domain (feature-name domain)
235 (let ((name (symbol-name feature-name)))
237 ((string-match "@[^*]+$" name)
238 (intern (format "%s/%s" name domain))
241 (intern (format "%s@%s" name domain))
245 (defun char-feature-name-parent (feature-name)
246 (let ((name (symbol-name feature-name)))
247 (if (string-match "@[^@/*]+\\(/[^@/*]+\\)*$" name)
248 (intern (substring name 0 (car (last (match-data) 2)))))))
250 (defun char-feature-name-domain (feature-name)
251 (let ((name (symbol-name feature-name)))
252 (if (string-match "@[^@/*]+\\(/[^@/*]+\\)*$" name)
253 (intern (substring name (1+ (match-beginning 0)))))))
255 (defun char-feature-name-sans-versions (feature)
256 (let ((feature-name (symbol-name feature)))
257 (if (string-match "[@/]\\$rev=latest$" feature-name)
258 (intern (substring feature-name 0 (match-beginning 0)))
261 (defun est-object-genre (object)
262 (if (characterp object)
264 (concord-object-genre object)))
266 (defun www-get-feature-value (object feature)
267 (let ((latest-feature (char-feature-name-at-domain feature '$rev=latest)))
270 (mount-char-attribute-table latest-feature)
271 (or (char-feature object latest-feature)
272 (char-feature object feature))
275 (or (condition-case nil
276 (concord-object-get object latest-feature)
279 (concord-object-get object feature)
283 (defun get-previous-code-point (ccs code)
284 (let ((chars (charset-chars ccs))
285 (dim (charset-dimension ccs))
287 mask byte-min byte-max
310 (setq bytes (make-vector dim 0))
312 (aset bytes i (logand (lsh code (* i -8)) mask))
315 (while (and (< i dim)
317 (aset bytes i (1- (aref bytes i)))
318 (< (aref bytes i) byte-min)))
319 (aset bytes i byte-max)
322 (setq dest (aref bytes 0)
325 (setq dest (logior dest (lsh (aref bytes i) (* i 8)))
329 (defun get-next-code-point (ccs code)
330 (let ((chars (charset-chars ccs))
331 (dim (charset-dimension ccs))
333 mask byte-min byte-max
356 (setq bytes (make-vector dim 0))
358 (aset bytes i (logand (lsh code (* i -8)) mask))
361 (while (and (< i dim)
363 (aset bytes i (1+ (aref bytes i)))
364 (> (aref bytes i) byte-max)))
365 (aset bytes i byte-min)
368 (setq dest (aref bytes 0)
371 (setq dest (logior dest (lsh (aref bytes i) (* i 8)))
375 (defun find-previous-defined-code-point (ccs code)
376 (let ((i (get-previous-code-point ccs code))
379 ((eq ccs '=jis-x0208)
380 (setq ccs '=jis-x0208@1990))
381 ((eq ccs '=jis-x0213-1)
382 (setq ccs '=jis-x0213-1@2004)))
385 (null (setq char (decode-char ccs i
386 (unless (eq ccs '=ucs)
388 (setq i (get-previous-code-point ccs i)))
391 (defun find-next-defined-code-point (ccs code)
392 (let ((i (get-next-code-point ccs code))
394 (setq max (+ code 1000))
396 ((eq ccs '=jis-x0208)
397 (setq ccs '=jis-x0208@1990))
398 ((eq ccs '=jis-x0213-1)
399 (setq ccs '=jis-x0213-1@2004)))
402 (null (setq char (decode-char ccs i
403 (unless (eq ccs '=ucs)
405 (setq i (get-next-code-point ccs i)))
409 ;;; @ URI representation
412 (defun est-uri-decode-feature-name-body (uri-feature)
413 (let ((len (length uri-feature))
420 (if (eq (aref uri-feature i) ?\.)
421 (if (and (< (+ i 2) len)
422 (eq (aref uri-feature (+ i 2)) ?\.))
425 ((eq (setq ch (aref uri-feature (1+ i))) ?\.)
430 (substring uri-feature i (+ i 3))
436 (char-to-string (aref uri-feature i))
440 (defun est-uri-encode-feature-name-body (feature)
441 (mapconcat (lambda (c)
446 (t (char-to-string c))))
449 (defun www-uri-decode-feature-name (uri-feature)
451 (setq uri-feature (decode-uri-string uri-feature 'utf-8-mcs-er))
453 ((string-match "^from\\." uri-feature)
454 (intern (format "<-%s"
455 (est-uri-decode-feature-name-body
456 (substring uri-feature (match-end 0)))))
458 ((string-match "^to\\." uri-feature)
459 (intern (format "->%s"
460 (est-uri-decode-feature-name-body
461 (substring uri-feature (match-end 0)))))
463 ((string-match "^rep\\." uri-feature)
464 (intern (format "=%s"
465 (est-uri-decode-feature-name-body
466 (substring uri-feature (match-end 0)))))
468 ((string-match "^rep[2i]\\." uri-feature)
469 (intern (format "===%s"
470 (est-uri-decode-feature-name-body
471 (substring uri-feature (match-end 0)))))
473 ((string-match "^g\\." uri-feature)
474 (intern (format "=>>%s"
475 (est-uri-decode-feature-name-body
476 (substring uri-feature (match-end 0)))))
478 ((string-match "^g[i2]\\." uri-feature)
479 (intern (format "==%s"
480 (est-uri-decode-feature-name-body
481 (substring uri-feature (match-end 0)))))
483 ((string-match "^gi\\([0-9]+\\)\\." uri-feature)
484 (intern (format "=>>%s%s"
485 (make-string (string-to-int
486 (match-string 1 uri-feature))
488 (est-uri-decode-feature-name-body
489 (substring uri-feature (match-end 0)))))
491 ((string-match "^o\\." uri-feature)
492 (intern (format "=+>%s"
493 (est-uri-decode-feature-name-body
494 (substring uri-feature (match-end 0)))))
496 ((string-match "^a\\." uri-feature)
497 (intern (format "=>%s"
498 (est-uri-decode-feature-name-body
499 (substring uri-feature (match-end 0)))))
501 ((string-match "^a\\([0-9]+\\)\\." uri-feature)
502 (intern (format "%s>%s"
503 (make-string (string-to-int
504 (match-string 1 uri-feature))
506 (est-uri-decode-feature-name-body
507 (substring uri-feature (match-end 0)))))
509 ((and (setq uri-feature (est-uri-decode-feature-name-body uri-feature))
510 (setq feature (intern (format "=>%s" uri-feature)))
511 (find-charset feature))
513 ((and (setq feature (intern (format "=>>%s" uri-feature)))
514 (find-charset feature))
516 ((and (setq feature (intern (format "=>>>%s" uri-feature)))
517 (find-charset feature))
519 ((and (setq feature (intern (format "=%s" uri-feature)))
520 (find-charset feature))
522 (t (intern uri-feature)))))
524 (defun www-uri-encode-feature-name (feature-name)
525 (setq feature-name (symbol-name feature-name))
527 ((string-match "^=\\+>\\([^=>]+\\)" feature-name)
529 (est-uri-encode-feature-name-body
530 (substring feature-name (match-beginning 1))))
532 ((string-match "^=\\([^=>]+\\)" feature-name)
534 (est-uri-encode-feature-name-body
535 (substring feature-name (match-beginning 1))))
537 ((string-match "^==\\([^=>]+\\)" feature-name)
539 (est-uri-encode-feature-name-body
540 (substring feature-name (match-beginning 1))))
542 ((string-match "^===\\([^=>]+\\)" feature-name)
544 (est-uri-encode-feature-name-body
545 (substring feature-name (match-beginning 1))))
547 ((string-match "^=>>\\([^=>]+\\)" feature-name)
549 (est-uri-encode-feature-name-body
550 (substring feature-name (match-beginning 1))))
552 ((string-match "^=>>>\\([^=>]+\\)" feature-name)
554 (est-uri-encode-feature-name-body
555 (substring feature-name (match-beginning 1))))
557 ((string-match "^=>>\\(>+\\)" feature-name)
559 (length (match-string 1 feature-name))
560 (est-uri-encode-feature-name-body
561 (substring feature-name (match-end 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 0))))
574 ((string-match "^->" feature-name)
576 (est-uri-encode-feature-name-body
577 (substring feature-name (match-end 0))))
579 ((string-match "^<-" feature-name)
581 (est-uri-encode-feature-name-body
582 (substring feature-name (match-end 0))))
584 (t (est-uri-encode-feature-name-body feature-name))))
586 (defun www-uri-make-feature-name-url (uri-genre uri-feature-name uri-object)
587 (if est-hide-cgi-mode
588 (format "../feature/%s&%s/%s"
589 uri-feature-name uri-genre uri-object)
590 (format "%s?feature=%s&%s=%s"
591 chise-wiki-view-url uri-feature-name uri-genre uri-object)))
593 (defun www-uri-decode-object (genre char-rep)
596 ((string-match (if est-hide-cgi-mode
597 "\\(%3D\\|=\\|%3A\\|:\\)"
598 "\\(%3A\\|:\\)") char-rep)
599 (setq ccs (substring char-rep 0 (match-beginning 0))
600 cpos (substring char-rep (match-end 0)))
601 (setq ccs (www-uri-decode-feature-name ccs))
602 (setq cpos (est-uri-decode-feature-name-body cpos))
604 ((string-match "^0x" cpos)
606 (string-to-number (substring cpos (match-end 0)) 16))
609 (setq cpos (car (read-from-string
611 cpos file-name-coding-system))))
613 (if (and (eq genre 'character)
615 (decode-char ccs cpos)
616 (concord-decode-object ccs cpos genre))
619 (setq char-rep (decode-uri-string char-rep 'utf-8-mcs-er))
621 ((eq genre 'character)
622 (when (= (length char-rep) 1)
626 (concord-decode-object
627 '=id (www-uri-decode-feature-name char-rep) 'feature)
630 (concord-decode-object
631 '=id (car (read-from-string char-rep)) genre)
634 (defun www-uri-encode-object (object)
635 (if (characterp object)
636 (if (encode-char object '=ucs)
639 (format "%%%02X" byte))
640 (encode-coding-string (char-to-string object) 'utf-8-mcs-er)
642 (let ((ccs-list est-coded-charset-priority-list)
645 (setq ccs (pop ccs-list))
646 (not (setq ret (encode-char object ccs 'defined-only)))))
648 (format (if est-hide-cgi-mode
651 (www-uri-encode-feature-name ccs)
653 ((and (setq ccs (car (split-char object)))
654 (setq ret (encode-char object ccs)))
655 (format (if est-hide-cgi-mode
658 (www-uri-encode-feature-name ccs)
661 (format (if est-hide-cgi-mode
662 "system-char-id=0x%X"
663 "system-char-id:0x%X")
664 (encode-char object 'system-char-id))
666 (format (if est-hide-cgi-mode
669 (est-uri-encode-feature-name-body
670 (format "%s" (concord-object-id object))))))
672 (defun est-format-object (object &optional readable)
673 (if (characterp object)
674 (char-to-string object)
675 (let ((ret (or (if readable
676 (or (concord-object-get object 'name)
677 (concord-object-get object '=name)
678 (concord-object-get object 'title)))
679 (concord-object-id object))))
682 (defun www-uri-make-object-url (object &optional uri-object)
683 (if est-hide-cgi-mode
686 (est-object-genre object)
688 (www-uri-encode-object object)))
691 (est-object-genre object)
693 (www-uri-encode-object object)))))
696 ;;; @ Feature name presentation
699 (defun www-format-feature-name-default (feature-name)
703 (symbol-name feature-name)
707 (defun www-format-feature-name-as-metadata (feature-name &optional lang)
708 (let ((str (symbol-name feature-name))
711 ((string-match "\\*[^*]+$" str)
712 (setq base (substring str 0 (match-beginning 0))
713 meta (substring str (match-beginning 0)))
714 (concat (www-format-feature-name* (intern base) lang)
717 (www-format-feature-name-default feature-name)
720 (defun www-format-feature-name-as-rel-to (feature-name)
721 (concat "\u2192" (substring (symbol-name feature-name) 2)))
723 (defun www-format-feature-name-as-rel-from (feature-name)
724 (concat "\u2190" (substring (symbol-name feature-name) 2)))
726 (defun www-format-feature-name-as-CCS (feature-name)
729 (symbol-name feature-name)
731 (dest (upcase (pop rest))))
732 (when (string-match "^=+>*" dest)
733 (setq dest (concat (substring dest 0 (match-end 0))
735 (substring dest (match-end 0)))))
739 (setq dest (concat dest " " (upcase (pop rest)))))
740 (if (string-match "^[0-9]+$" (car rest))
741 (concat dest "-" (car rest))
742 (concat dest " " (upcase (car rest))))
746 (defun www-format-feature-name* (feature-name &optional lang)
747 (let (name fn parent ret)
750 (char-feature-property
752 (intern (format "name@%s" lang))))
753 (char-feature-property
754 feature-name 'name)))
755 ((and (setq name (symbol-name feature-name))
756 (string-match "\\*" name))
757 (www-format-feature-name-as-metadata feature-name lang))
759 (setq fn feature-name)
760 (while (and (setq parent (char-feature-name-parent fn))
763 (char-feature-property
765 (intern (format "name@%s" lang))))
766 (char-feature-property
771 (concat ret (substring (symbol-name feature-name)
772 (length (symbol-name parent)))))
773 ((find-charset feature-name)
774 (www-format-feature-name-as-CCS feature-name))
775 ((string-match "^\\(->\\)" name)
776 (www-format-feature-name-as-rel-to feature-name))
777 ((string-match "^\\(<-\\)" name)
778 (www-format-feature-name-as-rel-from feature-name))
780 (www-format-feature-name-default feature-name)
784 (defun www-format-feature-name (feature-name &optional lang)
785 (www-format-encode-string
786 (www-format-feature-name* feature-name lang)))
792 (defvar www-format-char-img-style "vertical-align:bottom;")
794 (defun www-format-encode-string (string &optional without-tags as-body)
797 (let (plane code subcode start end char variants ret rret)
799 (goto-char (point-min))
800 (while (search-forward "&" nil t)
801 (replace-match "&" nil t)))
802 (goto-char (point-min))
803 (while (search-forward "<" nil t)
804 (replace-match "<" nil t))
805 (goto-char (point-min))
806 (while (search-forward ">" nil t)
807 (replace-match ">" nil t))
809 (encode-coding-region (point-min)(point-max) 'utf-8-mcs-er)
810 (let ((coded-charset-entity-reference-alist
814 '(=hanyo-denshi/ja "HD-JA-" 4 X)
815 '(=hanyo-denshi/jb "HD-JB-" 4 X)
816 '(=hanyo-denshi/jc "HD-JC-" 4 X)
817 '(=hanyo-denshi/jd "HD-JD-" 4 X)
818 '(=hanyo-denshi/ft "HD-FT-" 4 X)
819 '(=hanyo-denshi/ia "HD-IA-" 4 X)
820 '(=hanyo-denshi/ib "HD-IB-" 4 X)
821 '(=hanyo-denshi/hg "HD-HG-" 4 X)
822 '(=hanyo-denshi/ip "HD-IP-" 4 X)
823 '(=hanyo-denshi/jt "HD-JT-" 4 X)
824 '(=hanyo-denshi/ks "HD-KS-" 6 d)
825 '(=>>hanyo-denshi/ja "G-HD-JA-" 4 X)
826 '(=>>hanyo-denshi/jb "G-HD-JB-" 4 X)
827 '(=>>hanyo-denshi/jc "G-HD-JC-" 4 X)
828 '(=>>hanyo-denshi/jd "G-HD-JD-" 4 X)
829 '(=>>hanyo-denshi/ft "G-HD-FT-" 4 X)
830 '(=>>hanyo-denshi/ia "G-HD-IA-" 4 X)
831 '(=>>hanyo-denshi/ib "G-HD-IB-" 4 X)
832 '(=>>hanyo-denshi/hg "G-HD-HG-" 4 X)
833 '(=>>hanyo-denshi/ip "G-HD-IP-" 4 X)
834 '(=>>hanyo-denshi/jt "G-HD-JT-" 4 X)
835 '(=>>hanyo-denshi/ks "G-HD-KS-" 6 d)
837 '(==hanyo-denshi/ja "g2-HD-JA-" 4 X)
838 '(==hanyo-denshi/jb "g2-HD-JB-" 4 X)
839 '(==hanyo-denshi/jc "g2-HD-JC-" 4 X)
840 '(==hanyo-denshi/jd "g2-HD-JD-" 4 X)
841 '(==hanyo-denshi/ft "g2-HD-FT-" 4 X)
842 '(==hanyo-denshi/ia "g2-HD-IA-" 4 X)
843 '(==hanyo-denshi/ib "g2-HD-IB-" 4 X)
844 '(==hanyo-denshi/hg "g2-HD-HG-" 4 X)
845 '(==hanyo-denshi/ip "g2-HD-IP-" 4 X)
846 '(==hanyo-denshi/jt "g2-HD-JT-" 4 X)
847 '(==hanyo-denshi/ks "g2-HD-KS-" 6 d)
848 '(=cns11643-1 "C1-" 4 X)
849 '(=cns11643-2 "C2-" 4 X)
850 '(=cns11643-3 "C3-" 4 X)
851 '(=cns11643-4 "C4-" 4 X)
852 '(=cns11643-5 "C5-" 4 X)
853 '(=cns11643-6 "C6-" 4 X)
854 '(=cns11643-7 "C7-" 4 X)
855 '(=adobe-japan1-6 "AJ1-" 5 d)
856 '(=big5-cdp "CDP-" 4 X)
857 '(=>big5-cdp "A-CDP-" 4 X)
859 '(=gb12345 "G1-" 4 X)
860 '(=jis-x0208@1990 "J90-" 4 X)
861 '(=jis-x0212 "JSP-" 4 X)
863 '(=jis-x0208@1997 "J97-" 4 X)
864 '(=jis-x0208@1978 "J78-" 4 X)
865 '(=jis-x0208@1983 "J83-" 4 X)
866 '(=ruimoku-v6 "RUI6-" 4 X)
867 '(=zinbun-oracle "ZOB-" 4 d)
868 '(=jef-china3 "JC3-" 4 X)
869 '(=ucs@unicode "UU+" 4 X)
870 '(=ucs@JP/hanazono "hanaJU+" 4 X)
871 '(==cns11643-1 "R-C1-" 4 X)
872 '(==cns11643-2 "R-C2-" 4 X)
873 '(==cns11643-3 "R-C3-" 4 X)
874 '(==cns11643-4 "R-C4-" 4 X)
875 '(==cns11643-5 "R-C5-" 4 X)
876 '(==cns11643-6 "R-C6-" 4 X)
877 '(==cns11643-7 "R-C7-" 4 X)
878 '(=hanziku-1 "HZK01-" 4 X)
879 '(=hanziku-2 "HZK02-" 4 X)
880 '(=hanziku-3 "HZK03-" 4 X)
881 '(=hanziku-4 "HZK04-" 4 X)
882 '(=hanziku-5 "HZK05-" 4 X)
883 '(=hanziku-6 "HZK06-" 4 X)
884 '(=hanziku-7 "HZK07-" 4 X)
885 '(=hanziku-8 "HZK08-" 4 X)
886 '(=hanziku-9 "HZK09-" 4 X)
887 '(=hanziku-10 "HZK10-" 4 X)
888 '(=hanziku-11 "HZK11-" 4 X)
889 '(=hanziku-12 "HZK12-" 4 X)
892 '(=daikanwa "M-" 5 d)
893 coded-charset-entity-reference-alist)))
894 (encode-coding-region (point-min)(point-max) 'utf-8-mcs-er)
896 (goto-char (point-min))
897 (while (re-search-forward "&\\(A-\\|G-\\|g2-\\|R-\\)?CB\\([0-9]+\\);" nil t)
898 (setq code (string-to-int (match-string 2)))
900 (format "<img alt=\"CB%05d\" src=\"%s/cb-gaiji/%02d/CB%05d.gif\"
903 chise-wiki-bitmap-glyphs-url
905 www-format-char-img-style)
908 (goto-char (point-min))
909 (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)
910 (setq plane (match-string 2)
911 code (string-to-int (match-string 3) 16))
913 (format "<img alt=\"J%s-%04X\" src=\"%s/JIS-%s/%02d-%02d.gif\"
916 chise-wiki-bitmap-glyphs-url
919 (- (logand code 255) 32)
920 www-format-char-img-style)
923 (goto-char (point-min))
924 (while (re-search-forward "&\\(o-\\|G-\\|g2-\\|R-\\)?J0-\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\\);" nil t)
925 (setq code (string-to-int (match-string 2) 16))
927 (format "<img alt=\"J0-%04X\" src=\"%s/JIS-90/%02d-%02d.gif\"
930 chise-wiki-bitmap-glyphs-url
932 (- (logand code 255) 32)
933 www-format-char-img-style)
936 (goto-char (point-min))
937 (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)
938 (setq plane (match-string 2)
939 code (string-to-int (match-string 3) 16))
941 (format "<img alt=\"HD-%s-%04X\" src=\"%s/IVD/HanyoDenshi/%s%02d%02d.png\"
944 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-\\(IP\\|JT\\)-\\([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%04X.png\"
959 chise-wiki-bitmap-glyphs-url
961 www-format-char-img-style)
964 (goto-char (point-min))
965 (while (re-search-forward "&\\(o-\\|G-\\|g2-\\|R-\\)?HD-KS-\\([0-9]+\\);" nil t)
966 (setq code (string-to-int (match-string 2)))
968 (format "<img alt=\"HD-KS%06d\" src=\"%s/IVD/HanyoDenshi/KS%06d.png\"
969 style=\"vertical-align:middle\">"
971 chise-wiki-bitmap-glyphs-url
973 www-format-char-img-style)
976 (goto-char (point-min))
977 (while (re-search-forward "&G\\([01]\\)-\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\\);" nil t)
978 (setq plane (string-to-int (match-string 1))
979 code (string-to-int (match-string 2) 16))
981 (format "<img alt=\"GB%d-%04X\" src=\"%s/GB%d/%02d-%02d.gif\"
984 chise-wiki-bitmap-glyphs-url
987 (- (logand code 255) 32)
988 www-format-char-img-style)
991 (goto-char (point-min))
992 (while (re-search-forward "&\\(R-\\)?C\\([1-7]\\)-\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\\);" nil t)
993 (setq plane (string-to-int (match-string 2))
994 code (string-to-int (match-string 3) 16))
996 (format "<img alt=\"CNS%d-%04X\" src=\"%s/CNS%d/%04X.gif\"
999 chise-wiki-bitmap-glyphs-url
1001 www-format-char-img-style)
1004 (goto-char (point-min))
1005 (while (re-search-forward "&\\(R-\\)?JC3-\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\\);" nil t)
1006 (setq code (string-to-int (match-string 2) 16))
1008 (format "<img alt=\"JC3-%04X\" src=\"http://kanji.zinbun.kyoto-u.ac.jp/db/CHINA3/Gaiji/%04x.gif\">"
1012 (goto-char (point-min))
1013 (while (re-search-forward "&\\(A-\\)?ZOB-\\([0-9]+\\);" nil t)
1014 (setq code (string-to-int (match-string 2)))
1016 (format "<img alt=\"ZOB-%04d\" src=\"%s/ZOB-1968/%04d.png\"
1017 style=\"vertical-align:middle\">"
1019 chise-wiki-bitmap-glyphs-url
1021 www-format-char-img-style)
1024 (goto-char (point-min))
1025 (while (re-search-forward "&SW-JIGUGE\\([45]?\\)-\\([0-9]+\\);" nil t)
1026 (setq subcode (match-string 1)
1027 code (string-to-int (match-string 2)))
1029 (if (string= subcode "")
1033 (format "<div class=\"tooltip\"><img alt=\"SW-JIGUGE%s-%05d\" src=\"%s/ShuoWen/Jiguge%s/%05d.png\"
1034 style=\"vertical-align:middle; width: auto; max-height: 80px\"><span
1035 class=\"tooltiptext\">%s</span></div>"
1037 chise-wiki-bitmap-glyphs-url
1039 (charset-description
1040 (if (string= subcode "")
1042 (intern (format "===shuowen-jiguge%s" subcode)))))
1045 (goto-char (point-min))
1046 (while (re-search-forward "&HNG\\([0-9]+\\)-\\([0-9][0-9][0-9][0-9]\\)\\([0-9]\\);" nil t)
1047 (setq plane (match-string 1)
1048 code (string-to-int (match-string 2))
1049 subcode (string-to-int (match-string 3)))
1053 (char-to-string (decode-char 'ascii (+ 96 subcode)))))
1056 "<div class=\"tooltip\"><img alt=\"HNG%s-%04d%s\" src=\"%s/%s/%04d%s.png\" style=\"
1057 vertical-align:middle; width: auto; max-height: 60px\"><span
1058 class=\"tooltiptext\">%s</span></div>"
1060 chise-wiki-hng-bitmap-glyphs-url
1062 (charset-description
1063 (car (find (format "HNG%s-" plane)
1064 coded-charset-entity-reference-alist
1065 :test (lambda (key cell)
1066 (string= key (nth 1 cell))))))
1070 (goto-char (point-min))
1071 (while (re-search-forward "&\\(o-\\|G-\\|g2-\\|R-\\)?AJ1-\\([0-9]+\\);" nil t)
1072 (setq code (string-to-int (match-string 2)))
1074 (format "<img alt=\"AJ1-%05d\" src=\"%s/IVD/AdobeJapan1/CID+%d.png\"
1075 style=\"vertical-align:middle\">"
1077 chise-wiki-bitmap-glyphs-url
1079 www-format-char-img-style)
1082 (goto-char (point-min))
1083 (while (re-search-forward "&\\(A-\\|o-\\|G-\\|g2-\\|R-\\)?MJ\\([0-9]+\\);" nil t)
1084 (setq code (string-to-int (match-string 2)))
1086 (format "<img alt=\"MJ%06d\" src=\"http://mojikiban.ipa.go.jp/MJ%06d.png\"
1087 style=\"vertical-align:middle; width: 48px; height: 48px\">"
1090 www-format-char-img-style)
1093 (goto-char (point-min))
1094 (while (re-search-forward "&\\(o-\\|G-\\|g2-\\)?IU[+-]\\([0-9A-F]+\\);" nil t)
1095 (setq code (string-to-int (match-string 2) 16))
1097 (format "<img alt=\"u%04x\" src=\"http://glyphwiki.org/glyph/u%04x.100px.png\"
1098 style=\"vertical-align:middle; width: 48px; height: 48px\">"
1101 www-format-char-img-style)
1104 (goto-char (point-min))
1105 (while (re-search-forward "&A-\\(comp\\|cgn\\)U[+-]\\([0-9A-F]+\\);" nil t)
1106 (setq code (string-to-int (match-string 2) 16))
1108 (format "<img alt=\"u%04x\" src=\"http://glyphwiki.org/glyph/u%04x.100px.png\"
1109 style=\"vertical-align:middle; width: 48px; height: 48px\">"
1112 www-format-char-img-style)
1115 (goto-char (point-min))
1116 (while (re-search-forward
1117 "&\\(A-\\|g2-\\)?U-i\\([0-9]+\\)\\+\\([0-9A-F]+\\);"
1119 (setq plane (string-to-int (match-string 2))
1120 code (string-to-int (match-string 3) 16))
1122 (format "<img alt=\"u%04x-itaiji-%03d\" src=\"http://glyphwiki.org/glyph/u%04x-itaiji-%03d.100px.png\"
1123 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-IWDSU\\+\\([0-9A-F]+\\);" nil t)
1133 (setq code (string-to-int (match-string 1) 16))
1135 (format "<img alt=\"A-IWDSU+%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-\\)?CDP-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=\"cdp-%04x-itaiji-%03d\" src=\"http://glyphwiki.org/glyph/cdp-%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 "&\\(g2-\\)?U-v\\([0-9]+\\)\\+\\([0-9A-F]+\\);" nil t)
1160 (setq plane (string-to-int (match-string 2))
1161 code (string-to-int (match-string 3) 16))
1163 (format "<img alt=\"u%04x-var-%03d\" src=\"http://glyphwiki.org/glyph/u%04x-var-%03d.100px.png\"
1164 style=\"vertical-align:middle; width: 48px; height: 48px\">"
1169 www-format-char-img-style)
1172 (goto-char (point-min))
1173 (while (re-search-forward "&\\(A-\\|G-\\|R-\\|g2-\\)?GT-\\([0-9]+\\);" nil t)
1174 (setq code (string-to-int (match-string 2)))
1176 (format "<img alt=\"GT-%05d\" src=\"%s?char=GT-%05d\"
1179 chise-wiki-glyph-cgi-url
1181 www-format-char-img-style)
1184 (goto-char (point-min))
1185 (while (re-search-forward "&\\(A-\\|G-\\|g2-\\)?GT-K\\([0-9]+\\);" nil t)
1186 (setq code (string-to-int (match-string 2)))
1188 (format "<img alt=\"GT-K%05d\" src=\"%s?char=GT-K%05d\"
1191 chise-wiki-glyph-cgi-url
1193 www-format-char-img-style)
1196 (goto-char (point-min))
1197 (while (re-search-forward "&B-\\([0-9A-F]+\\);" nil t)
1198 (setq code (string-to-int (match-string 1) 16))
1200 (format "<img alt=\"B-%04X\" src=\"%s?char=B-%04X\"
1203 chise-wiki-glyph-cgi-url
1205 www-format-char-img-style)
1208 (goto-char (point-min))
1209 (while (re-search-forward
1210 "&\\(A-\\|G-\\|g2-\\|R-\\)?CDP-\\([0-9A-F]+\\);" nil t)
1211 (setq code (string-to-int (match-string 2) 16))
1213 (format "<img alt=\"CDP-%04X\" src=\"%s?char=CDP-%04X\"
1216 chise-wiki-glyph-cgi-url
1218 www-format-char-img-style)
1221 (goto-char (point-min))
1222 (while (re-search-forward
1223 "&\\(I-\\)?HZK\\(0[1-9]\\|1[0-2]\\)-\\([0-9A-F]+\\);" nil t)
1224 (setq plane (match-string 2)
1225 code (string-to-int (match-string 3) 16))
1227 (format "<img alt=\"HZK%s-%04X\" src=\"%s?char=HZK%s-%04X\"
1231 chise-wiki-glyph-cgi-url
1234 www-format-char-img-style)
1237 (goto-char (point-min))
1238 (while (re-search-forward "&\\(A-\\|G-\\|g2-\\|R-\\)?RUI6-\\([0-9A-F]+\\);" nil t)
1239 (setq code (string-to-int (match-string 2) 16))
1241 (format "<img alt=\"RUI6-%04X\" src=\"%s?char=RUI6-%04X\"
1242 style=\"vertical-align:middle\">"
1244 chise-wiki-glyph-cgi-url
1246 www-format-char-img-style)
1249 (goto-char (point-min))
1250 (while (re-search-forward "&hanaJU\\+\\([0-9A-F]+\\);" nil t)
1251 (setq code (string-to-int (match-string 1) 16))
1253 (format "<img alt=\"hanaJU+%04X\" src=\"%s?char=hana-JU+%04X\"
1254 style=\"vertical-align:middle\">"
1256 chise-wiki-glyph-cgi-url
1258 www-format-char-img-style)
1261 (goto-char (point-min))
1262 (while (re-search-forward "&\\(A-\\|G-\\|g2-\\|R-\\)?\\(UU\\+\\|U-\\)\\([0-9A-F]+\\);" nil t)
1263 (setq code (string-to-int (match-string 3) 16))
1265 (format "<img alt=\"UU+%04X\" src=\"http://www.unicode.org/cgi-bin/refglyph?24-%04X\"
1266 style=\"vertical-align:middle\">"
1269 www-format-char-img-style)
1272 (goto-char (point-min))
1273 (while (re-search-forward "&MCS-\\([0-9A-F]+\\);" nil t)
1274 (setq code (string-to-int (match-string 1) 16))
1275 (setq start (match-beginning 0)
1277 (setq char (decode-char 'system-char-id code))
1279 ((and (setq variants
1280 (or (www-get-feature-value char '->subsumptive)
1281 (www-get-feature-value char '->denotational)))
1283 (if (characterp variants)
1284 (setq variants (list variants)))
1285 (while (and variants
1286 (setq ret (www-format-encode-string
1287 (char-to-string (car variants))))
1288 (string-match "&MCS-\\([0-9A-F]+\\);" ret))
1289 (setq variants (cdr variants)))
1291 (unless (string-match "&MCS-\\([0-9A-F]+\\);" ret)
1293 (delete-region start end)
1296 ((setq ret (or (www-get-feature-value char 'ideographic-combination)
1297 (www-get-feature-value char 'ideographic-structure)))
1302 (if (characterp (setq rret (find-char ch)))
1305 (www-format-encode-string
1306 (char-to-string ch) without-tags)
1307 (www-format-encode-string
1308 (format "%S" ch) without-tags)))
1312 (delete-region start end)
1316 ;; (goto-char (point-min))
1317 ;; (while (search-forward ">-" nil t)
1318 ;; (replace-match "&GT-" t 'literal))
1321 (defun www-html-display-text (text)
1325 (goto-char (point-min))
1326 (while (search-forward "<" nil t)
1327 (replace-match "<" nil t))
1328 (goto-char (point-min))
1329 (while (search-forward ">" nil t)
1330 (replace-match ">" nil t))
1331 (goto-char (point-min))
1332 (while (re-search-forward "\\[\\[\\([^]|[]+\\)|\\([^][]+\\)\\]\\]" nil t)
1334 (format "<a href=\"%s\">%s</a>"
1338 (encode-coding-region (point-min)(point-max) 'utf-8-mcs-er)
1339 (goto-char (point-min))
1340 (while (search-forward ">-" nil t)
1341 (replace-match "&GT-" nil t))
1344 (defun www-html-display-paragraph (text)
1346 (www-html-display-text text)
1353 (defvar coded-charset-GlyphWiki-id-alist
1354 '((===adobe-japan1-0 "aj1-" 5 d nil)
1355 (===adobe-japan1-1 "aj1-" 5 d nil)
1356 (===adobe-japan1-2 "aj1-" 5 d nil)
1357 (===adobe-japan1-3 "aj1-" 5 d nil)
1358 (===adobe-japan1-4 "aj1-" 5 d nil)
1359 (===adobe-japan1-5 "aj1-" 5 d nil)
1360 (===adobe-japan1-6 "aj1-" 5 d nil)
1361 (===ucs@jis "u" 4 x nil)
1362 (===daikanwa "dkw-" 5 d nil)
1363 (===ucs@ks "u" 4 x "-k")
1364 (==ucs-itaiji-005 "u" 4 x "-itaiji-005")
1365 (=ucs-var-001 "u" 4 x "-var-001")
1366 (=ucs-var-002 "u" 4 x "-var-002")
1367 (=ucs-var-003 "u" 4 x "-var-003")
1368 (=ucs-var-004 "u" 4 x "-var-004")
1369 (=ucs-itaiji-001 "u" 4 x "-itaiji-001")
1370 (=ucs-itaiji-002 "u" 4 x "-itaiji-002")
1371 (=ucs-itaiji-003 "u" 4 x "-itaiji-003")
1372 (=ucs-itaiji-084 "u" 4 x "-itaiji-084")
1373 (=>ucs-itaiji-001 "u" 4 x "-itaiji-001")
1374 (=>ucs-itaiji-006 "u" 4 x "-itaiji-006")
1375 (==adobe-japan1-0 "aj1-" 5 d nil)
1376 (==adobe-japan1-1 "aj1-" 5 d nil)
1377 (==adobe-japan1-2 "aj1-" 5 d nil)
1378 (==adobe-japan1-3 "aj1-" 5 d nil)
1379 (==adobe-japan1-4 "aj1-" 5 d nil)
1380 (==adobe-japan1-5 "aj1-" 5 d nil)
1381 (==adobe-japan1-6 "aj1-" 5 d nil)
1382 (==ucs@jis "u" 4 x nil)
1383 (==ucs@iso "u" 4 x nil)
1384 (==ucs@cns "u" 4 x "-t")
1385 (==ucs@unicode "u" 4 x "-us")
1386 (==daikanwa "dkw-" 5 d nil)
1387 (==ucs@ks "u" 4 x "-k")
1388 (==jis-x0208@1978 "j78-" 4 x nil)
1389 (==jis-x0208 "j90-" 4 x nil)
1390 (==jis-x0208@1990 "j90-" 4 x nil)
1391 (==jis-x0208@1983 "j83-" 4 x nil)
1392 (==cbeta "cbeta-" 5 d nil)
1393 (=>>hanyo-denshi/ks "koseki-" 6 d nil)
1394 (=>>jis-x0208@1978 "j78-" 4 x nil)
1395 (=>>big5-cdp "cdp-" 4 x nil)
1396 (=>>adobe-japan1-0 "aj1-" 5 d nil)
1397 (=>>adobe-japan1-1 "aj1-" 5 d nil)
1398 (=>>adobe-japan1-2 "aj1-" 5 d nil)
1399 (=>>adobe-japan1-3 "aj1-" 5 d nil)
1400 (=>>adobe-japan1-4 "aj1-" 5 d nil)
1401 (=>>adobe-japan1-5 "aj1-" 5 d nil)
1402 (=>>adobe-japan1-6 "aj1-" 5 d nil)
1403 (=>>jis-x0208 "j90-" 4 x nil)
1404 (=>>jis-x0208@1990 "j90-" 4 x nil)
1405 (=>>jis-x0208@1983 "j83-" 4 x nil)
1406 (=>>daikanwa "dkw-" 5 d nil)
1407 (=adobe-japan1-0 "aj1-" 5 d nil)
1408 (=adobe-japan1-1 "aj1-" 5 d nil)
1409 (=adobe-japan1-2 "aj1-" 5 d nil)
1410 (=adobe-japan1-3 "aj1-" 5 d nil)
1411 (=adobe-japan1-4 "aj1-" 5 d nil)
1412 (=adobe-japan1-5 "aj1-" 5 d nil)
1413 (=adobe-japan1-6 "aj1-" 5 d nil)
1414 (=decomposition@cid)
1415 (=decomposition@hanyo-denshi)
1416 (=hanyo-denshi/ks "koseki-" 6 d nil)
1417 (=koseki "koseki-" 6 d nil)
1418 (=ucs@jis "u" 4 x nil)
1419 (=ucs@cns "u" 4 x "-t")
1420 (=ucs@ks "u" 4 x "-k")
1421 (=ucs@JP "u" 4 x nil)
1422 (=ucs@gb "u" 4 x "-g")
1423 (=ucs@iso "u" 4 x "-u")
1424 (=ucs@unicode "u" 4 x "-us")
1425 (=big5-cdp "cdp-" 4 x nil)
1426 (=>big5-cdp "cdp-" 4 x nil)
1427 (=cbeta "cbeta-" 5 d nil)
1428 (=big5-cdp-var-3 "cdp-" 4 x "-var-3")
1429 (=big5-cdp-var-5 "cdp-" 4 x "-var-5")
1430 (=big5-cdp-itaiji-001 "cdp-" 4 x "-itaiji-001")
1431 (=big5-cdp-itaiji-002 "cdp-" 4 x "-itaiji-002")
1432 (=>big5-cdp-itaiji-001 "cdp-" 4 x "-itaiji-001")
1433 (=jef-china3 "jc3-" 4 x nil)
1434 (=jis-x0212 "jsp-" 4 x nil)
1435 (=jis-x0213-1@2000 "jx1-2000-" 4 x nil)
1436 (=jis-x0213-1@2004 "jx1-2004-" 4 x nil)
1437 (=jis-x0213-2 "jx2-" 4 x nil)
1438 (=gt-k "gt-k" 5 d nil)
1439 (=jis-x0208@1978/1pr "j78-" 4 x nil)
1440 (=jis-x0208@1978/-4pr "j78-" 4 x nil)
1441 (=jis-x0208@1978 "j78-" 4 x nil)
1442 (=+>jis-x0208@1978 "j78-" 4 x nil)
1443 (=+>jis-x0208 "j90-" 4 x nil)
1444 (=+>jis-x0208@1990 "j90-" 4 x nil)
1445 (=+>jis-x0208@1983 "j83-" 4 x nil)
1447 (=big5 "b-" 4 x nil)
1448 (=daikanwa "dkw-" 5 d nil)
1450 (=ruimoku-v6 "rui6-" 4 x nil)
1451 (=>ruimoku-v6 "rui6-" 4 x nil)
1452 (=ks-x1001 "k0-" 4 x nil)
1453 (=cns11643-1 "c1-" 4 x nil)
1454 (=cns11643-2 "c2-" 4 x nil)
1455 (=cns11643-3 "c3-" 4 x nil)
1456 (=cns11643-4 "c4-" 4 x nil)
1457 (=cns11643-5 "c5-" 4 x nil)
1458 (=cns11643-6 "c6-" 4 x nil)
1459 (=cns11643-7 "c7-" 4 x nil)
1460 (=jis-x0208 "j90-" 4 x nil)
1461 (=jis-x0208@1990 "j90-" 4 x nil)
1462 (=jis-x0208@1983 "j83-" 4 x nil)
1465 (defun char-GlyphWiki-id (char)
1466 (let ((rest coded-charset-GlyphWiki-id-alist)
1469 (setq spec (pop rest))
1470 (null (setq ret (get-char-attribute char (car spec))))))
1474 (mapconcat #'char-GlyphWiki-id ret "-"))
1475 (and (memq (car spec) '(=ucs@unicode '=ucs@iso))
1477 ((and (or (encode-char char '=jis-x0208@1990)
1478 (encode-char char '=jis-x0212)
1479 (encode-char char '=jis-x0213-1)
1480 (encode-char char '=jis-x0213-2))
1481 (setq code (encode-char char '=ucs@jis)))
1482 (format "u%04x" code)
1484 ((and (or (encode-char char '=gb2312)
1485 (encode-char char '=gb12345))
1486 (setq code (encode-char char '=ucs@gb)))
1487 (format "u%04x-g" code)
1489 ((and (or (encode-char char '=cns11643-1)
1490 (encode-char char '=cns11643-2)
1491 (encode-char char '=cns11643-3)
1492 (encode-char char '=cns11643-4)
1493 (encode-char char '=cns11643-5)
1494 (encode-char char '=cns11643-6)
1495 (encode-char char '=cns11643-7))
1496 (setq code (encode-char char '=ucs@cns)))
1497 (format "u%04x-t" code)
1499 ((and (encode-char char '=ks-x1001)
1500 (setq code (encode-char char '=ucs@ks)))
1501 (format "u%04x-k" code)
1503 (format (format "%s%%0%d%s%s"
1507 (or (nth 4 spec) ""))
1514 (provide 'cwiki-common)
1516 ;;; cwiki-common.el ends here