Subject: bug#23814: 24.5; bug of hz coding-system

From: [email-masked]
Date: Wed, 22 Jun 2016 22:47:00 +0900

Eli Zaretskii <[email-masked]> writes:

> This is by design, and mentioned in the doc string of that
> coding-system.  Since Emacs is Unicode based, the _only_ way of having
> "chinese-gb2312 characters" is by using that text property.

`encode-hz-region' uses `iso-2022-7bit' coding-system internally,
replacing it with the coding-system below will work.

(define-coding-system 'iso-2022-cn-gb
  "ISO 2022 based 7bit encoding only for Chinese GB2312."
  :coding-type 'iso-2022
  :mnemonic ?C
  :charset-list '(ascii chinese-gb2312)
  :designation [(ascii chinese-gb2312) nil nil nil]
  :flags '(ascii-at-eol ascii-at-cntl designation 7-bit safe)
  )