Emacs: Unicode Tutorial

By Xah Lee. Date: . Last updated: .

for a intro of Unicode, see Unicode: Character Set, Encoding, UTF-8, Codepoint

emacs unicode 2021-08-28
emacs showing Unicode chars. You can download this text here: unicode.txt.

Set default file encoding

Insert a Unicode Character by Name

Alt+x insert-char, then the name of the Unicode. For example, try to insert . Its name is RIGHTWARDS ARROW.

Note: insert-char was ucs-insert in emacs 24.3 or before. [see Emacs 24 (Released 2012-06)]

Insert a Unicode Char by Char ID in Hexadecimal

Alt+x insert-char, then the hexadecimal of the Unicode.

For example, try to insert . Its hexadecimal value is 2192.

Insert a Unicode Char by Char ID in Decimal

Alt+x insert-char, then type #10r followed by the decimal codepoint. e.g. #10r8594

For example, try to insert . Its coidpoint in decimal is 8594.

Find a Character's Name and Codepoint

For a mode to make this easier, see xub Unicode Browser mode for Emacs.

Use Abbrev to Insert Unicode Char

Use Abbrev with Completion to Insert Unicode Char

Set a Key to Insert Unicode Char

Insert letter with accent marks é

To see all characters you can type this way, press Ctrl+x 8 Ctrl+h. Example: ¿ ¡ ¢ £ ¥ ¤ § ¶ ® © ª «» × ÷ ¬ ° ± µ ÀÁÂÃÄÅÆ Ç ÈÉÊË ÌÍÎÏ ÐÑ ÒÓÔÕÖ ØÙÚÛÜÝÞß àáâãäåæç èéêë ìíîï ðñòóôõö øùúûüýþÿ.

If you need to type these chars often,

Alt+x set-input-method then type “latin-9-prefix”. That will allow you to type these chars without typing Ctrl+x 8 first.

(Emacs's “latin-9-prefix” corresponds to the char set ISO 8859-9)

List all input methods. There about 263 builtin in emacs.

Find out current input method

Variable. Value is buffer's input method. [see Emacs: Show Variable Value]

Emacs and Unicode

File Encoding

Unicode Font Setup