Category Archives: Unicode

UTF-8 in GNU Emacs

I nicked the following from http://linux.seindal.dk/2004/08/07/gnu-emacs-and-utf-8-locale/:

(setq locale-coding-system 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(set-selection-coding-system 'utf-8)
(prefer-coding-system 'utf-8)

You may also specify your preference toward the Unix newline convention:

(setq locale-coding-system 'utf-8-unix)
(set-terminal-coding-system 'utf-8-unix)
(set-keyboard-coding-system 'utf-8-unix)
(set-selection-coding-system 'utf-8-unix)
(prefer-coding-system 'utf-8-unix)