Emacs: Unicode Tutorial

By Xah Lee. Date: . Last updated: .

First see: Unicode Basics: Character Set, Encoding, UTF-8, Codepoint

screenshot 20210828162214 KhxkS
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-charCtrl+x 8 Enter】, 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.1 Features (released 2012-06)]

Insert a Unicode Char by Char ID in Hexadecimal

Alt+x insert-charCtrl+x 8 Enter】, 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-charCtrl+x 8 Enter】, 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

Buy my package to support my work: Emacs: Xah Math Input Mode, xah-math-input.el

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-input-methods
List all input methods. There about 263 builtin in emacs.

Find out current input method

current-input-method
Variable. Value is buffer's input method. [see Emacs: Show Variable Value, List Variables]

Setup Font for Missing Emoji 😸 or Math Symbols ∑

Emacs and Unicode

File Encoding


Emacs Tutorial

Quick Start

Font

Split Window

File

Buffer

Copy/Paste

Find Replace

Unicode

Whitespace

Rectangle Edit

Line Wrap

Shell

View Special File

Editing Brackets

Org Mode

HTML

Emacs Efficiency

Misc