[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Help: using chinese-gbk
Quoting Katsumi Yamaoka <yamaoka@xxxxxxx>:
In [emacs-w3m : No.09366] Jielei Fan wrote:
But some chinese character can not be showed correctly in some web page,
for example, http://www.xinhuanet.com/newscenter/ldrbdzj/index_3.htm,
because in this web page, '?F' is a character which is not in gb2313
This page uses the GB2312 charset and the world famous person's
name is encoded into "\326\354\351F\273\371". Firefox displays
it correctly, however I confirmed emacs-w3m doesn't. If this is
able to be decoded by the `chinese-gbk' coding system, you can
add a rule to the `w3m-compatible-encoding-alist' as follows:
(add-to-list 'w3m-compatible-encoding-alist '(gb2312 . chinese-gbk))
;; Add this line to the ~/.emacs-w3m.el file or evaluate it by
;; typing the `C-x C-e' key at the end of the line.
This has been implemented because many European web pages use
the WINDOWS-1252 charset in spite of specifying the ISO-8859-1
charset (WINDOWS-1252 is a superset of ISO-8859-1).
BTW, I've installed the mule-gbk-0.1.2004080701.tar.gz package
for Emacs 22. However, using it I see only boxes or question
marks for any Chinese text so far. With your Emacs 22, can you
see his name correctly by evaluating the following Lisp form?
(decode-coding-string "\326\354\351F\273\371" 'chinese-gbk)
;; Copy this line to the *scratch* buffer and type the `C-j' key
;; at the end of this line.
In Emacs 23, the `chinese-gbk' coding system is supported
natively, however it shows a box for the data "\351F" either:
Thank you very much for your reply,
I think I should improve my emacs and w3m to solve my problem:)
Evaluating (decode-coding-string "\326\354\351F\273\371" 'chinese-gbk)
is successful in my emacs22, the exsiting problems in your emacs22 and
emacs 23 maybe caused by fontset setting.
in my .emacs, I use such codes
to let emacs to choose fontsets.
By the way,
I use emacs22 under win xp system, and the externel w3m by cygwin,
do I need to install w3m-mee instead of w3m?