shamelessly copied from
http://linux.seindal.dk/2004/08/07/gnu-emacs-and-utf-8-locale/GNU Emacs and UTF-8 locale
I recently wanted to shift to a UTF-8 locale, because I wanted to play with stuff like writing in Arabic, and because it seems to be the road forward.
So I switched and GNU Emacs starts to enter garbage in my buffers. I type “������ ��
“, but Emacs gives me “æøå��� éí�
“. Ever so slightly less useful, and less readable too.
I tried fiddling with “Options | Mule | Language Environments” and “Options | Mule | Set Coding System”, but to no avail.
Somewhat deluded I gave up and went back to Latin 1, mostly at least. Every once in a while I tried again, and one day I stumbled over a reference to the Emacs file etc/PROBLEMS
, a section on problems with UTF-8 support in GNU Emacs. Unfortunately the section was gone from my copy, but I found it on the net.
The solution to all my problems: add the following lines to ~/.emacs
:
(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)
The problem went away and haven’t been seen since.
BTW, I’m using GNU Emacs 21.3.1, installed from Debian testing and unstable (tried them both).
Tags: Linux
1 comment:
彌月禮盒團購美食 印刷 彩色印刷 包裝 設計pe膜 冬令營 food processing equipment frying machine Telecom PCB 泡菜 團購美食油飯麻糬
創業加盟 水餃 壯陽食品 早洩漆彈情趣用品 湯包 搬家公司 會場設計紙盒訂裝 展覽設計展場設計 展覽設計 消防設備 消防設備 機電 崴立機電 牙齒美白 植牙
Post a Comment