From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Handa Kenichi Newsgroups: gmane.emacs.bugs Subject: bug#14368: 24.3.50; Big screw: multibyte characters become unibyte Date: Fri, 24 May 2013 10:51:20 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1369407156 15819 80.91.229.3 (24 May 2013 14:52:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 24 May 2013 14:52:36 +0000 (UTC) Cc: 14368@debbugs.gnu.org, rms@gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri May 24 16:52:34 2013 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 1UftM9-0002Ip-Vm for geb-bug-gnu-emacs@m.gmane.org; Fri, 24 May 2013 16:52:34 +0200 Original-Received: from localhost ([::1]:57664 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UftM9-0005QZ-Lh for geb-bug-gnu-emacs@m.gmane.org; Fri, 24 May 2013 10:52:33 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:32844) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UftLk-0004qe-5s for bug-gnu-emacs@gnu.org; Fri, 24 May 2013 10:52:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UftLj-0002K4-5N for bug-gnu-emacs@gnu.org; Fri, 24 May 2013 10:52:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43785) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UftLj-0002Jt-2m for bug-gnu-emacs@gnu.org; Fri, 24 May 2013 10:52:07 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UftMc-0000fh-I5 for bug-gnu-emacs@gnu.org; Fri, 24 May 2013 10:53:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Handa Kenichi Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 May 2013 14:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14368 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 14368-submit@debbugs.gnu.org id=B14368.13694071532494 (code B ref 14368); Fri, 24 May 2013 14:53:02 +0000 Original-Received: (at 14368) by debbugs.gnu.org; 24 May 2013 14:52:33 +0000 Original-Received: from localhost ([127.0.0.1]:60376 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UftM7-0000e3-F7 for submit@debbugs.gnu.org; Fri, 24 May 2013 10:52:32 -0400 Original-Received: from fencepost.gnu.org ([208.118.235.10]:34450 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UftM0-0000de-Dy for 14368@debbugs.gnu.org; Fri, 24 May 2013 10:52:29 -0400 Original-Received: from handa by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1UftKy-0008DV-8L; Fri, 24 May 2013 10:51:20 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:74524 Archived-At: I'm very sorry for the late response on this matter. In article <83a9o09oc1.fsf@gnu.org>, Eli Zaretskii writes: > However, quail seems to work by deleting some characters from the > buffer, and then reinserting them, possibly after translation, as > instructed by the additional characters you type. In this case, > typing "a '" inserts =C3=A1, and quail then waits for another character. > Typing C-a at this point removes =C3=A1 from the buffer, and then sends as > input 2 events: a self-inserting character whose code is 225 decimal > (that's =C3=A1), followed by the code 1, which is C-a. (I don't know if > this is how quail is supposed to work; what I described is what I saw > in the debugger. Perhaps Handa-san could comment on that.) Your analysis is correct. Quail is an event translator. It is designed not to insert a character directly but to generate proper character events. > I'm not sure how to fix this cleanly. One way would be to get quail > to encode the character events it sends, but then we have problems > with un-encodable characters. It is a possible way, but I don't think that is the right thing. Making quail encode characters and making the caller to re-decode them looks like very silly. > Another way would be to somehow detect > that the character comes from quail and refrain from decoding it, It's not only the quail problem. Currently the handling of unread-command-events is broken; this does not work correctly on terminal (setq unread-command-events '(?=C3=80)) --- Kenichi Handa handa@gnu.org