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?

1 Answer 1

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))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.