Filename in chinese shows as unicode characters

[Origin]: http://stackoverflow.com/questions/17961148/filename-in-chinese-shows-as-unicode-characters

when using C-x C-f, the filename which includes Chinese characters are shown as following:

How can I configure it to show Chinese words? Thank you.

=====updated=======

System: OS X 10.8.4

Emacs version: GNU Emacs 24.3.1 (x86_64-apple-darwin)

shareedit

I think this may be caused by one of those annoying interactions between the operating system and Emacs. Emacs doesn’t seem to know how to interpret the file names, so let’s try to help it by inserting this in your .emacs file.

(setq default-buffer-file-coding-system 'utf-8-unix)
(setq default-file-name-coding-system 'gb2312)
(setq default-keyboard-coding-system 'utf-8-unix)
(setq default-process-coding-system '(utf-8-unix . utf-8-unix))

You may need to try a different system instead of gb2312.

shareedit
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s