2

For example I know that 2018 is the hexadecimal equivalent of left single quotation mark, and I have the following questions:

  • 1: Is there a way to input the Unicode name to Emacs and get the equivalent code, and vice versa?
  • 2: Is there a way to list them all?

I know I can list the Unicode names using C-x 8 RET TAB, but this list doesn't show the equivalent codes (preferably in decimal).

2
  • 2018 is the hexadecimal value for LEFT SINGLE QUOTATION MARK, not the decimal value. Are you sure your question meets your actual requirements?
    – phils
    Oct 4, 2018 at 4:10
  • @phils thank's for pointing that out, I corrected it.
    – Bite Bytes
    Oct 4, 2018 at 10:11

2 Answers 2

2
  1. @paulie4 pointed out command describe-char.

  2. Command apropos-char from library apu.el prompts you for an apropos pattern to match against Unicode character names. The pattern is a regexp or parts of the names to match. Then it shows you the characters, their names, and their code points (decimal and hex). See Apropos Unicode.

2

You can use M-x describe-char to get info on the character under your cursor (see http://ergoemacs.org/emacs/emacs_n_unicode.html). Since you know C-x 8 RET can be used to enter a Unicode character using its name, I think that should answer your first question, but I do not know if there's a way to list them all by code points.

Note: I just looked at the help for insert-char, and it says you can enter the code point to insert using decimal by prefixing it with #10r :

  • As a code point with a radix specified with #, e.g. #o21430 (octal), #x2318 (hex), or #10r8984 (decimal).
1
  • 1
    n.b. C-u C-x = is the standard key binding to show you the describe-char information (and plain C-x = shows some minimal details in the echo area).
    – phils
    Oct 4, 2018 at 4:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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