;; -*- coding: utf-8-mcs-er -*- (defvar chise-wiki-view-url "../view.cgi") (defvar chise-wiki-edit-url "edit.cgi") (require 'cwiki-common) (defun www-edit-display-char-feature-default (char feature-name &optional value lang) (unless value (setq value (char-feature char feature-name))) (www-html-display-paragraph (format "[[%s|%s?feature=%s]] : %s [[[edit|edit.cgi?char=%s&feature=%s]]]" (www-format-feature-name feature-name lang) chise-wiki-view-url (www-uri-encode-feature-name feature-name) (www-format-value value feature-name nil 'without-tags) (char-to-string char) (www-uri-encode-feature-name feature-name) ))) (defun www-edit-display-char-feature-as-ucs (char feature-name &optional value) (unless value (setq value (char-feature char feature-name))) (www-html-display-paragraph (format "= [[U+%s|http://www.unicode.org/cgi-bin/GetUnihanData.pl?codepoint=%s]] (%d)" (www-format-value-as-HEX value) (www-format-value-as-HEX value) value))) (defun www-edit-display-input-box (name value &optional format) (when (stringp format) (setq format (intern format))) (let (prefix) (if (or (eq format 'HEX) (eq format 'hex)) (if (integerp value) (setq prefix "0x"))) (princ (www-format-encode-string (format "%s \u2190 %s" name (or prefix "")))) (princ (format " " (www-format-encode-string (format "%s" name) 'without-tags) (www-format-apply-value format nil value nil nil 'without-tags) )))) (defun www-edit-display-char-desc (uri-char uri-feature-name &optional lang format) (when (stringp format) (setq format (intern format))) (let ((char (www-uri-decode-char uri-char)) (feature-name (www-uri-decode-feature-name uri-feature-name)) base-name metadata-name char-spec str) (when (characterp char) (princ (format "