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#4240: 23.1.50; C-u doesn't work with Swedish characters Date: Sun, 23 Aug 2009 23:40:00 +0300 Message-ID: <833a7ifen3.fsf@gnu.org> References: <7b501d5c0908230628r5bc2cad2he3fc7a2249fcac5@mail.gmail.com> <87ljlas6nn.fsf@mail.jurta.org> Reply-To: Eli Zaretskii , 4240@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1251060446 4694 80.91.229.12 (23 Aug 2009 20:47:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 23 Aug 2009 20:47:26 +0000 (UTC) Cc: deniz.a.m.dogan@gmail.com To: Juri Linkov , 4240@emacsbugs.donarmstrong.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Aug 23 22:47:18 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MfJyA-0000EJ-2l for geb-bug-gnu-emacs@m.gmane.org; Sun, 23 Aug 2009 22:47:18 +0200 Original-Received: from localhost ([127.0.0.1]:36764 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MfJy9-00086M-IH for geb-bug-gnu-emacs@m.gmane.org; Sun, 23 Aug 2009 16:47:17 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MfJxs-0007uP-Ez for bug-gnu-emacs@gnu.org; Sun, 23 Aug 2009 16:47:00 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MfJxn-0007tj-Pw for bug-gnu-emacs@gnu.org; Sun, 23 Aug 2009 16:47:00 -0400 Original-Received: from [199.232.76.173] (port=51081 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MfJxn-0007tg-KL for bug-gnu-emacs@gnu.org; Sun, 23 Aug 2009 16:46:55 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:49234) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MfJxm-00029B-NN for bug-gnu-emacs@gnu.org; Sun, 23 Aug 2009 16:46:55 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7NKkpf4004922; Sun, 23 Aug 2009 13:46:52 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n7NKj4PZ004550; Sun, 23 Aug 2009 13:45:04 -0700 Resent-Date: Sun, 23 Aug 2009 13:45:04 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Eli Zaretskii Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Sun, 23 Aug 2009 20:45:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4240 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 4240-submit@emacsbugs.donarmstrong.com id=B4240.12510600354022 (code B ref 4240); Sun, 23 Aug 2009 20:45:04 +0000 Original-Received: (at 4240) by emacsbugs.donarmstrong.com; 23 Aug 2009 20:40:35 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mtaout22.012.net.il (mtaout22.012.net.il [80.179.55.172]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7NKeXpe004010 for <4240@emacsbugs.donarmstrong.com>; Sun, 23 Aug 2009 13:40:34 -0700 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0KOU00I00JO7OE00@a-mtaout22.012.net.il> for 4240@emacsbugs.donarmstrong.com; Sun, 23 Aug 2009 23:40:02 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.228.180.85]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0KOU00IKGK2OE620@a-mtaout22.012.net.il>; Sun, 23 Aug 2009 23:40:01 +0300 (IDT) In-reply-to: <87ljlas6nn.fsf@mail.jurta.org> X-012-Sender: halo1@inter.net.il X-MIME-Autoconverted: from 8bit to quoted-printable by rzlab.ucr.edu id n7NKkpf4004922 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Sun, 23 Aug 2009 16:47:00 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:30505 Archived-At: > From: Juri Linkov > Date: Sun, 23 Aug 2009 21:54:04 +0300 > Cc: 4240@emacsbugs.donarmstrong.com >=20 > > I hit "C-u =E4" expecting it to come out as "=E4=E4=E4=E4". Instead = it comes out > > as "=E4\344\344=E4". I try "C-u C-u =E4" and it comes out as "=E4" f= ollowed by > > fourteen "\344" and then a trailing "=E4". This happens no matter wh= ich > > kind of repetition I'm doing, be it using C-u or using e.g. M-3. It'= s > > always the leading and the trailing character that come out right, al= l > > of the other ones are "broken". >=20 > Please see bug#4037: > http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=3D4037 >=20 > I received no confirmation that my proposed fix is correct. I think those two lines are not necessary anymore and should be removed (together with the comments which explain their need). I think they belong to the old pre-unicode days when raw eight-bit characters needed such special treatment. Handa-san, can you please comment on that? > Maybe the right fix is to reverse negation? Why, do you see that the code without these two lines don't DTRT when the characters are inserted into a unibyte buffer? If it works in both cases, it's the evidence that I'm right and this code is not needed anymore. > It seems logical to check if a buffer is unibyte before converting > from unibyte to multibyte, but I don't understand what this code was > supposed to do. It was supposed to produce a multibyte character from a unibyte one, by using a special locale-dependent table that mapped, e.g., 8859-1 encoded Latin-1 characters in the range [128..255] to the corresponding multibyte codepoints of Latin-1 characters in the internal representation of characters Emacs 22 used. See the Emacs 22 definition of unibyte_char_to_multibyte in src/charset.c. Nowadays we don't need that, since we have a special range of multibyte codepoints for representing unibyte characters in multibyte buffers and strings, and insert-char and the primitives it calls already DTRT with them. So there should be no need to do anything special outside insert-char.