Emacs: Set Default File Encoding

By Xah Lee. Date: . Last updated: .

Put this in your Emacs Init File:

;; UTF-8 as default encoding
(set-language-environment "UTF-8")
(set-default-coding-systems 'utf-8)
(set-keyboard-coding-system 'utf-8-unix)

;; do this especially on Windows, else python output problem
(set-terminal-coding-system 'utf-8-unix)

Alt+x list-coding-systems to see possible valid values.

Emacs and Unicode

File Encoding


Emacs Init

Init Basics

Keys

Font

Text Editing

Completion

File

Restore Things

Backup/AutoSave

Line

Appearance

Misc

Advanced Init Tips

packages

ErgoEmacs mascot-s276x226
Buy Xah Emacs Tutorial