Reputation: 1499
I need to read one C++ head file which has some Chinese and was encoded using utf-8.
Emacs should recognize this encoding, but it turns out:
Then, I changed it to text-mode, it works:
I also tested for python-mode, lisp-mode, etc, all works except c-mode, c++-mode, java-mode, seems there are something wrong with cc-mode, or the cc-vars?
Please help me if you know how to fix this weird problem.
Upvotes: 2
Views: 245
Reputation: 221
Actually, it is arguably a bug in Emacs: it should fallback to some other font (non-italics, if needed) rather than display blank squares. We have fixed a few such problems ober the years, so try the latest Emacs-24 pretest to see if the bug is already fixed there, and otherwise M-x report-emacs-bug
Upvotes: 2
Reputation: 26549
That looks more like a missing font (rather than encoding) issue; i.e., your system lacks a properly configured Chinese italic font.
Upvotes: 3