views:

359

answers:

4

I often use simple Chinese phrases like "你好" to test that my code can handle non-ascii characters. Whenever I enter Chinese characters directly into Emacs, they just come out as question marks.

Emacs can sometimes display characters properly if I open a premade text file but not always. For example, if I create a simple text file in Notepad with "你好" in it, the 好 displays fine but 你 just shows a box. Can Emacs handle Chinese characters? If so, how do I set it up?

I'm running Emacs 22.3.1 on Windows with the Courier New font, but I'm also curious about having this work on Linux. I have all the needed Eastern Language packages installed. I can edit in Chinese in Notepad with no problem.

A: 

Have you tried this (leim)? http://www.khngai.com/emacs/chinese.php

teki
A: 

You need to install suitable font family, with all glyphs, for example microsoft ttf fonts

Alex Ott
A: 

Liberation Mono font, which I use under Emacs, can display these characters.

+1  A: 

The Emacs 23 release solves the problem I was having on Windows. Chinese characters work properly with no fussing or hacking. I can write Chinese directly in a buffer or open a file with no issues. Emacs's unicode support wasn't fully implemented until version 23.

Emacs 23 Release Notes

Cristian
Yeah, that's correct. I've copied the text from the question into a buffer and it displays correctly. v23.1.1
justinhj