* lisp/language/chinese.el: Disable :ascii-compatible-p for chinese-hz.
* test/lisp/international/mule-tests.el (mule-hz): New test.
(define-coding-system-alias 'hz-gb-2312 'chinese-hz)
(define-coding-system-alias 'hz 'chinese-hz)
+;; FIXME: 'define-coding-system' automatically sets :ascii-compatible-p,
+;; to any encoding whose :coding-type is 'utf-8', but UTF-7 is not ASCII
+;; compatible, so we override that here (bug#40407).
+(coding-system-put 'chinese-hz :ascii-compatible-p nil)
+
(set-language-info-alist
"Chinese-GB" '((charset chinese-gb2312 chinese-sisheng)
(iso639-language . zh)
(should (equal (encode-coding-string "あ" 'utf-7-imap) "&MEI-"))
(should (equal (decode-coding-string "&MEI-" 'utf-7-imap) "あ")))
+(ert-deftest mule-hz ()
+ ;; The chinese-hz encoding is not ASCII compatible.
+ (should-not (coding-system-get 'chinese-hz :ascii-compatible-p)))
;; Stop "Local Variables" above causing confusion when visiting this file.
\f