Emacs: Set Default File Encoding

By Xah Lee. Date: .

Put this in your Emacs Init File:

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

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

Do not set a bunch of other variables such as set-terminal-coding-system, unless you know emacs's encoding system well.

Emacs, 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