Emacs does not display Unicode on reboot

When I insert - (em dash) into a text file, Emacs initially displays it in order. When I restart Emacs, all instances are displayed as \ 342 \ 200 \ 224.

How can I get Emacs to display characters in the same way as originally? I am using Windows 7 and Emacs 24.3.1. The main mode is Text, and the youngest is Fill.

+3
source share
1 answer

Try pasting this into your initialization file. He needs to make sure emacs saves the files as Unicode (and reads them correctly afterwards).

;;;;;;;;;;;;;;;;;;;;
;;; set up unicode
(prefer-coding-system       'utf-8)
(set-default-coding-systems 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(setq default-buffer-file-coding-system 'utf-8)                      
(setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING))

, , . .: -)

+4

All Articles