Notes on Unicode in Emacs

Much more information is available in the Emacs online help and in the Emacs manual. This page just gives some brief notes.

How can I enter accented letters not present on your keyboard?

You can type C-x 8 followed by a punctuation mark and the letter to accent. For example, C-x 8 ’ e inserts é. The punctuation marks used to specify accents are fairly mnemonic. Here are some of the more common examples.

graveC-x 8 ` eè
acuteC-x 8 ’ eé
circumflexC-x 8 ^ oô
tildeC-x 8 ~ nñ
umlautC-x 8 " oö
cedillaC-x 8 , cç

For more information, type C-x 8 C-h

How can I enter arbitrary Unicode characters?

C-x 8 RET followed by either the code point in hex or the name of the official Unicode name of the character.

How can I find out information about a character?

C-u C-x = will give information about the character under the cursor.

How can I tell what encoding your file is using?

Type C-h C RET. (Note that’s an upper case C.) This will tell you the coding system for the current buffer and much more.

How can I change a file’s encoding?

C-x RET f will prompt you for an encoding. You could then enter utf-8, for example, to specify UTF-8 encoding.


Related resources

For daily tips on using Unix, follow @UnixToolTip on Twitter.

UnixToolTip twitter icon