📄 readme.mime
字号:
-*- text -*- This file roughly describe the mime coding problems about GBK in GNUEmacs21, which covers two famous mail agents of Emacs: - Mew: A great MIME mail reader for Emacs/XEmacs (http://www.mew.org/) - Gnus: Gnus Network User Services (http://www.gnus.org/)1. Multipurpose Internet Mail Extensions(MIME) The MIME standard is covered mainly by RFC 1521 and RFC 1522, etc.To special the textual encoding with GBK, the mail should use a linein the header which looks like Content-Type: Text/Plain; charset=gbk Here, `gbk' is the name of the `mime charset'. According to RFC 1251, the charset name w/o the publication ofa formal specification and its registration with Internet AssignedNumbers Authority (IANA), or by private agreement, must begin withan additional "X-". Therefore, we can find that there are large amountInternet mails with header like Content-Type: Text/Plain; charset=x-gbk But, now a days GBK is a registered charset of IANA:---------------8<---------------Name: GBK MIBenum: 113Source: Chinese IT Standardization Technical Committee Please see: <http://www.iana.org/assignments/charset-reg/GBK>Alias: CP936Alias: MS936Alias: windows-936 ---------------8<--------------- See http://www.iana.org/assignments/character-setsfor the informations of charset list, and http://www.iana.org/assignments/charset-reg/GBKfor the registration text compiled by Anthony Fok <anthony@thizlinux.com>. Note that, there are 3 aliases of GBK in the publication of IANA, itmay be better to count them in, although it seems that no one usesthem.2. Mew setup To use GBK encoding in Mew, added the following Elisp codes intoyour init file of Emacs, and make sure that these will be evaluatedbefore Mew loads. ;; For GBK (eval-after-load "mew" '(progn (setq mew-cs-database-for-decoding (append '(("gbk" . gbk) ("x-gbk" . gbk) ("cp936" . gbk) ("ms936" . gbk) ("windows-936" . gbk)) mew-cs-database-for-decoding)) (add-to-list 'mew-cs-database-for-encoding '((ascii chinese-cns11643-5 chinese-cns11643-6 chinese-cns11643-7) gbk "base64" "B")))) This setup has been simply tested on Mew 3.3 w/ GNU Emacs 21.3.3. Gnus setup Be patient to read up this section!!! In Gnus(running in GNU Emacs21), the mime charset to encode thetext is determined by a property `mime-charset' of the current codingsystem of the text buffer, which is not specified in coding system`Chinese-gbk' of the old versions of mule-gbk, so that Gnus encodedthe GBK text with wrong coding system. It has been fixed sincemule-gbk 0.1.2004062701. And the encoding system to decode the text of the mail is determineby the `charset=...' information in the mail header. For GBK support, we need to evaluate the following Elisp codesbefore Gnus loads up. ;; For GBK (eval-after-load "mm-util" '(setq mm-charset-synonym-alist (append '((x-gbk . gbk) (cp936 . gbk) (ms936 . gbk) (windows-936 . gbk)) mm-charset-synonym-alist))) Because the file `mm-util.el' in Gnus, which defines`mm-charset-synonym-of-gbk-alist' is also a part of GNU Emacs, weadded the above setup for Gnus into `mule-gbk.el'. Thus, the onlytask left to you is to make sure that mule-gbk is loaded before thelibrary `mm-util'(or Gnus) :) This setup has been simply tested on Gnus 5.10.6 w/ GNU Emacs 21.3.4. Bug report Bug reports or suggestions (mailto:yoyosu@ustc.edu.cn) are greatlywelcome!--SU Yong <yoyosu@ustc.edu.cn>Sun, 27 Jun 2004 04:33:44 +0800
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -