From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#23814: 24.5; bug of hz coding-system Date: Sat, 09 Jul 2016 14:20:19 +0300 Message-ID: <83d1mngirw.fsf@gnu.org> References: <87k2hhnoj1.fsf@gmail.com> <83h9cl3zj6.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1468063288 14806 80.91.229.3 (9 Jul 2016 11:21:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 9 Jul 2016 11:21:28 +0000 (UTC) Cc: ynyaaa@gmail.com, 23814@debbugs.gnu.org To: handa@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 09 13:21:17 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bLqJx-0001A2-0p for geb-bug-gnu-emacs@m.gmane.org; Sat, 09 Jul 2016 13:21:17 +0200 Original-Received: from localhost ([::1]:49879 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLqJt-0003py-2f for geb-bug-gnu-emacs@m.gmane.org; Sat, 09 Jul 2016 07:21:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45961) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLqJn-0003pr-1Y for bug-gnu-emacs@gnu.org; Sat, 09 Jul 2016 07:21:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bLqJi-0004SV-06 for bug-gnu-emacs@gnu.org; Sat, 09 Jul 2016 07:21:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59169) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLqJh-0004SL-T8 for bug-gnu-emacs@gnu.org; Sat, 09 Jul 2016 07:21:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bLqJh-0003Fz-PH for bug-gnu-emacs@gnu.org; Sat, 09 Jul 2016 07:21:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Jul 2016 11:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23814 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23814-submit@debbugs.gnu.org id=B23814.146806324412480 (code B ref 23814); Sat, 09 Jul 2016 11:21:01 +0000 Original-Received: (at 23814) by debbugs.gnu.org; 9 Jul 2016 11:20:44 +0000 Original-Received: from localhost ([127.0.0.1]:43273 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bLqJQ-0003FE-0j for submit@debbugs.gnu.org; Sat, 09 Jul 2016 07:20:44 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54927) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bLqJO-0003F2-SC for 23814@debbugs.gnu.org; Sat, 09 Jul 2016 07:20:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bLqJI-0004Op-QV for 23814@debbugs.gnu.org; Sat, 09 Jul 2016 07:20:37 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38518) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLqJD-0004NT-Pr; Sat, 09 Jul 2016 07:20:31 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1554 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bLqJ9-0007MG-7n; Sat, 09 Jul 2016 07:20:28 -0400 In-reply-to: <83h9cl3zj6.fsf@gnu.org> (message from Eli Zaretskii on Wed, 22 Jun 2016 20:26:53 +0300) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:120672 Archived-At: Ping! Could you please comment on this issue? > Date: Wed, 22 Jun 2016 20:26:53 +0300 > From: Eli Zaretskii > Cc: 23814@debbugs.gnu.org > > > From: ynyaaa@gmail.com > > Cc: 23814@debbugs.gnu.org > > Date: Thu, 23 Jun 2016 02:04:18 +0900 > > > > Eli Zaretskii writes: > > > > >> `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) > > >> ) > > > > > > What advantages does this change have? > > > > `iso-2022-7bit' may encode same character to various strings, > > while `iso-2022-cn-gb' encodes same charcter to same string. > > > > (mapcar (lambda (cs) (encode-coding-string > > (propertize "\x4e00" 'charset cs) > > 'iso-2022-7bit)) > > '(chinese-gb2312 japanese-jisx0208 korean-ksc5601 > > chinese-cns11643-1)) > > =>("\e$AR;\e(B" > > "\e$B0l\e(B" > > "\e$(Cli\e(B" > > "\e$(GD!\e(B") > > > > (mapcar (lambda (cs) (encode-coding-string > > (propertize "\x4e00" 'charset cs) > > 'iso-2022-cn-gb)) > > '(chinese-gb2312 japanese-jisx0208 korean-ksc5601 > > chinese-cns11643-1)) > > =>("\e$AR;\e(B" > > "\e$AR;\e(B" > > "\e$AR;\e(B" > > "\e$AR;\e(B") > > > > `encode-hz-region' expects `chinese-gb2312' characters are encoded > > with "\e$A" sequences, and replaces them to "~{". > > I understand, but as I said, I think this is by design, and should not > be changed. However, maybe I'm missing something, so I'll CC > Handa-san and ask him to comment on this proposal and the issue in > general.