(defun unicode-insert () "Read a unicode code point and insert said character. See also: `read-quoted-char-radix'" (interactive) (let ((char (read-quoted-char))) (if char (ucs-insert char)) )) (defconst unicode-data-txt "/usr/share/unidata/UnicodeData-4.0.1d1b.txt") (defun unicode-name-at-point () "Display the unicode name of the character at point." (interactive) (let* ((pos (point)) (char (char-after pos)) (unicode (when (or (< char 256) (memq 'utf-8 (find-coding-systems-region pos (1+ pos))) (get-char-property pos 'untranslated-utf-8)) (or (get-char-property pos 'untranslated-utf-8) (encode-char char 'ucs)))) (codepoint (when unicode (format "%04X" unicode))) (buf (find-file-noselect unicode-data-txt))) (with-current-buffer buf (goto-char (point-min)) (if (re-search-forward (concat "^" codepoint ";\\([^;]*\\);") nil t) (message "Codepoint %s: %s" codepoint (match-string 1)) (message "Unknown character number %s" codepoint)))))