Tags » Unicode

Emacs复制粘贴乱码问题以及修改当前文件编码

【转载】:http://www.cnblogs.com/ilfmonday/p/emacscoding.html

编码修改:

为了和Linux兼容,win环境下将emacs编码修改为utf-8,随意复制了其他关于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)
(setq default-buffer-file-coding-system 'utf-8)

问题与解决:

结果发现emacs和其他win的窗口进行相互的复制粘贴时出现问题,表现为当从其他窗口复制文字,粘贴到emacs中,出现乱码(\xxx这种形式)。细读手册,发现:

selection-coding-system

这个变量用于控制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)
(setq default-buffer-file-coding-system 'utf-8)
…
15 more words

Emacs

Chapter 54 Thank you, Indonesia summary

This chapter is known as “Recovering the Batak Unicode”. It was all about recovering the Batak Unicode since it went missing about a few days ago. 27 more words

Chapters

Syllabics and the Unicode Consortium

When the Canadian government announced the release of the Canada 150 Typeface last year, I was immensely pleased to read that it would support Cree syllabics. 363 more words

Cree

Chapter 53 Buginese language summary

After arriving the island of Sulawesi, Brian and his friends found the Buginese unicode in Makassar. Suddenly, it was unpredictable because one of Van’s brothers like mow is trying to run everyone over! 36 more words

Chapters

ASCII art

Encountering ASCII for the first time is an invisible experience, and it’s likely we’ve all used it. ASCII, the abbreviation for the American Standard Code for Information Exchange,  1,159 more words

Digital Language

Chapter 51 You found Balinese unicode! summary

I believe Carina found the Balinese unicode first, so Jack is flexible about it. In Denpasar, Brian and his friends discovered that the sign in Balinese, so they received more positive feedback from another group. 23 more words

Chapters

Google's new female emojis.

Any woman who has had to use Google emojis knows that our options are restricted to the Flamenco dancer in her fancy red dress, the two ballet dancers donning their bunny ears and the lady getting her hair cut to perfection or her nails painted like she is ready to hit the town. 495 more words

Female