From: Leo <sdl.web@gmail.com>
Subject: Re: emacs-unicode-2: miscellaneous addendum for coding system gbk and gb18030
Date: Fri, 24 Nov 2006 19:31:47 +0000 [thread overview]
Message-ID: <m2vel4ljz0.fsf@sl392.st-edmunds.cam.ac.uk> (raw)
In-Reply-To: u3b8ear3z.fsf@gmail.com
On Monday, 20 Nov 2006, Zhang Wei wrote:
> The gbk and gb18030 coding system support is added in emacs-unicode-2,
> Emacs 22 doesn't support them, so miscellaneous code must be added here
> and there, I gathered some patches and hope them useful.
>
> * local directory is at emacs@sv.gnu.org/emacs--unicode--0--patch-135
> * comparing to emacs@sv.gnu.org/emacs--unicode--0--patch-135
> A gbk-gb18030-patch
> M lisp/faces.el
> M lisp/international/characters.el
> M lisp/gnus/mm-util.el
> M lisp/gnus/rfc2047.el
> M lisp/international/mule-cmds.el
> M lisp/language/chinese.el
> M lisp/international/fontset.el
>
> * modified files
>
> --- orig/lisp/faces.el
> +++ mod/lisp/faces.el
> @@ -81,11 +81,11 @@
> (defcustom face-font-registry-alternatives
> (if (eq system-type 'windows-nt)
> '(("iso8859-1" "ms-oemlatin")
> - ("gb2312.1980" "gb2312")
> + ("gb2312.1980" "gb2312" "gbk" "gb18030")
> ("jisx0208.1990" "jisx0208.1983" "jisx0208.1978")
> ("ksc5601.1989" "ksx1001.1992" "ksc5601.1987")
> ("muletibetan-2" "muletibetan-0"))
> - '(("gb2312.1980" "gb2312.80&gb8565.88" "gbk*")
> + '(("gb2312.1980" "gb2312.80&gb8565.88" "gbk" "gb18030")
> ("jisx0208.1990" "jisx0208.1983" "jisx0208.1978")
> ("ksc5601.1989" "ksx1001.1992" "ksc5601.1987")
> ("muletibetan-2" "muletibetan-0")))
>
>
> --- orig/lisp/gnus/mm-util.el
> +++ mod/lisp/gnus/mm-util.el
> @@ -443,6 +443,10 @@
> (iso-2022-jp latin-jisx0201 japanese-jisx0208 japanese-jisx0208-1978)
> (euc-kr korean-ksc5601)
> (gb2312 chinese-gb2312)
> + (gbk chinese-gbk)
> + (gb18030 gb18030-2-byte
> + gb18030-4-byte-bmp gb18030-4-byte-smp
> + gb18030-4-byte-ext-1 gb18030-4-byte-ext-2)
> (big5 chinese-big5-1 chinese-big5-2)
> (tibetan tibetan)
> (thai-tis620 thai-tis620)
>
>
> --- orig/lisp/gnus/rfc2047.el
> +++ mod/lisp/gnus/rfc2047.el
> @@ -107,6 +107,8 @@
> (iso-2022-jp . B)
> (iso-2022-kr . B)
> (gb2312 . B)
> + (gbk . B)
> + (gb18030 . B)
> (big5 . B)
> (cn-big5 . B)
> (cn-gb . B)
>
>
> --- orig/lisp/international/characters.el
> +++ mod/lisp/international/characters.el
> @@ -834,12 +834,16 @@
> (cyrillic-iso8859-5 . cyrillic-iso-8bit)
> (latin-iso8859-9 . iso-latin-5)
> (japanese-jisx0208-1978 . iso-2022-jp)
> - (chinese-gb2312 . cn-gb-2312)
> + (chinese-gb2312 . chinese-iso-8bit)
> + (chinese-gbk . chinese-gbk)
> + (gb18030-2-byte . chinese-gb18030)
> + (gb18030-4-byte-bmp . chinese-gb18030)
> + (gb18030-4-byte-smp . chinese-gb18030)
> + (gb18030-4-byte-ext-1 . chinese-gb18030)
> + (gb18030-4-byte-ext-2 . chinese-gb18030)
> (japanese-jisx0208 . iso-2022-jp)
> (korean-ksc5601 . iso-2022-kr)
> (japanese-jisx0212 . iso-2022-jp)
> - (chinese-cns11643-1 . iso-2022-cn)
> - (chinese-cns11643-2 . iso-2022-cn)
> (chinese-big5-1 . chinese-big5)
> (chinese-big5-2 . chinese-big5)
> (chinese-sisheng . iso-2022-7bit)
> @@ -854,6 +858,8 @@
> (indian-glyph . devanagari)
> (tibetan-1-column . tibetan)
> (ethiopic . iso-2022-7bit)
> + (chinese-cns11643-1 . iso-2022-cn)
> + (chinese-cns11643-2 . iso-2022-cn)
> (chinese-cns11643-3 . iso-2022-cn)
> (chinese-cns11643-4 . iso-2022-cn)
> (chinese-cns11643-5 . iso-2022-cn)
>
>
> --- orig/lisp/international/fontset.el
> +++ mod/lisp/international/fontset.el
> @@ -50,6 +50,7 @@
> ("iso8859-15$" . iso-8859-15)
> ("gb2312.1980" . chinese-gb2312)
> ("gbk" . chinese-gbk)
> + ("gb18030" . gb18030)
> ("jisx0208.1978" . japanese-jisx0208-1978)
> ("jisx0208" . japanese-jisx0208)
> ("jisx0201" . jisx0201)
> @@ -306,6 +307,7 @@
> (nil . "CNS11643.1992-6")
> (nil . "CNS11643.1992-7")
> (nil . "gbk-0")
> + (nil . "gb18030")
> (nil . "JISX0213.2000-1")
> (nil . "JISX0213.2000-2")
> (nil . "JISX0213.2004-1"))
> @@ -323,6 +325,7 @@
> (nil . "CNS11643.1992-6")
> (nil . "CNS11643.1992-7")
> (nil . "gbk-0")
> + (nil . "gb18030")
> (nil . "JISX0213.2000-1")
> (nil . "JISX0213.2000-2"))
>
> @@ -363,6 +366,8 @@
>
> ;; Fallback fonts
> (nil (nil . "gb2312.1980")
> + (nil . "gbk-0")
> + (nil . "gb18030")
> (nil . "jisx0208")
> (nil . "ksc5601.1987")
> (nil . "CNS11643.1992-1")
> @@ -515,11 +520,11 @@
>
> ;; Setting for suppressing XLoadQueryFont on big fonts.
> (setq x-pixel-size-width-font-regexp
> - "gb2312\\|jisx0208\\|ksc5601\\|cns11643\\|big5")
> + "gb2312\\|gbk\\|gb18030\\|jisx0208\\|ksc5601\\|cns11643\\|big5")
>
> ;; These fonts require vertical centering.
> (setq vertical-centering-font-regexp
> - "gb2312\\|jisx0208\\|jisx0212\\|ksc5601\\|cns11643\\|big5")
> + "gb2312\\|gbk\\|gb18030\\|jisx0208\\|jisx0212\\|ksc5601\\|cns11643\\|big5")
>
> ;; CDAC fonts are actually smaller than their design sizes.
> (setq face-font-rescale-alist
> @@ -723,6 +728,11 @@
> (katakana-jisx0201 . kana)
> (chinese-gb2312 . han)
> (chinese-gbk . han)
> + (gb18030-2-byte . han)
> + (gb18030-4-byte-bmp . han)
> + (gb18030-4-byte-ext-1 . han)
> + (gb18030-4-byte-ext-2 . han)
> + (gb18030-4-byte-smp . han)
> (chinese-big5-1 . han)
> (chinese-big5-2 . han)
> (chinese-cns11643-1 . han)
>
>
> --- orig/lisp/international/mule-cmds.el
> +++ mod/lisp/international/mule-cmds.el
> @@ -2262,8 +2262,8 @@
> ("zh_CN.GB2312" "Chinese-GB")
> ("zh_CN.GBK" "Chinese-GBK")
> ("zh_CN.GB18030" "Chinese-GB18030")
> - ("zh_CN" . "Chinese-GB")
> - ("zh" . "Chinese-GB")
> + ("zh_CN" . "Chinese-GBK")
> + ("zh" . "Chinese-GBK")
> ("zu" . "Latin-1") ; Zulu
>
> ;; ISO standard locales
> @@ -2281,7 +2281,7 @@
> ("sp" . "Cyrillic-ISO") ; Serbian (Cyrillic alphabet), e.g. X11R6.4
> ("su" . "Latin-1") ; Finnish, e.g. Solaris 2.6
> ("jp" . "Japanese") ; e.g. MS Windows
> - ("chs" . "Chinese-GB") ; MS Windows Chinese Simplified
> + ("chs" . "Chinese-GBK") ; MS Windows Chinese Simplified
> ("cht" . "Chinese-BIG5") ; MS Windows Chinese Traditional
> ("gbz" . "UTF-8") ; MS Windows Dari Persian
> ("div" . "UTF-8") ; MS Windows Divehi (Maldives)
>
>
> --- orig/lisp/language/chinese.el
> +++ mod/lisp/language/chinese.el
> @@ -91,7 +91,6 @@
> (define-coding-system-alias 'euc-cn 'chinese-iso-8bit)
> (define-coding-system-alias 'cn-gb 'chinese-iso-8bit)
> (define-coding-system-alias 'gb2312 'chinese-iso-8bit)
> -(define-coding-system-alias 'cp936 'chinese-iso-8bit)
>
> (define-coding-system 'chinese-hz
> "Hz/ZW 7-bit encoding for Chinese GB2312 (MIME:HZ-GB-2312)."
> @@ -233,7 +232,8 @@
> (input-method . "chinese-py-punct") ; fixme?
> (sample-text . "Chinese (中文,普通话,汉语) 妳好")
> (features china-util)
> - (documentation . "Support for Chinese GBK character set."))
> + (documentation . "Support for Chinese GBK character set.")
> + (tutorial . "TUTORIAL.cn"))
> '("Chinese"))
>
> ;;; Chinese GB18030
> @@ -255,9 +255,11 @@
> (coding-priority gb18030 gbk iso-2022-cn chinese-big5
> chinese-iso-8bit) ; fixme?
> (input-method . "chinese-py-punct") ; fixme?
> + (sample-text . "Chinese (中文,普通话,汉语) 你好")
> (features china-util)
> - (documentation
> - . "Support for Chinese GB18030 character set."))
> + (documentation
> + . "Support for Chinese GB18030 character set.")
> + (tutorial . "TUTORIAL.cn"))
> '("Chinese"))
>
> ;; Fixme: add HKSCS
>
>
Any comments from the developers on these fixes?
--
Leo
next prev parent reply other threads:[~2006-11-24 19:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-20 18:51 emacs-unicode-2: miscellaneous addendum for coding system gbk and gb18030 Zhang Wei
2006-11-24 19:31 ` Leo [this message]
2006-11-26 3:02 ` Kenichi Handa
2006-11-26 7:34 ` Zhang Wei
2006-11-27 2:34 ` Richard Stallman
2006-11-27 5:58 ` Kenichi Handa
2006-11-27 6:25 ` Zhang Wei
2006-11-27 7:02 ` Zhang Wei
2006-11-27 7:41 ` Kenichi Handa
2006-11-27 7:43 ` Zhang Wei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2vel4ljz0.fsf@sl392.st-edmunds.cam.ac.uk \
--to=sdl.web@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).