3

(get-char-code-property ?ἀ 'decomposition) returns a list of two characters into which the given character is decomposed. Is it possible, given these characters, to recompose the original? Is there a function for that?

Toothrot
  • 3,204
  • 1
  • 12
  • 30

1 Answers1

4

I don't think Emacs has a mapping from the decomposed form back to the original character. You can look it up using ucs-names though:

(defun lookup-composed (decomp)
  (let (composed)
    (maphash (lambda (key val) (when (equal
                                      decomp
                                      (get-char-code-property val 'decomposition))
                                 (push val composed)))
             (ucs-names))
    composed))
rpluim
  • 4,605
  • 8
  • 22