GNU bug report logs - #4037
Characters garbled in self-insert-command

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> jurta.org>

Date: Tue, 4 Aug 2009 19:35:04 UTC

Severity: normal

Merged with 4240

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 4037 in the body.
You can then email your comments to 4037 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4037; Package emacs. (Tue, 04 Aug 2009 19:35:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Juri Linkov <juri <at> jurta.org>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Tue, 04 Aug 2009 19:35:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: emacs-pretest-bug <at> gnu.org
Subject: Characters garbled in self-insert-command
Date: Tue, 04 Aug 2009 22:27:42 +0300
I just noticed a regression against Emacs 22.

In GNU Emacs 23.1.50 (x86_64-pc-linux-gnu) typing

  C-u 5 C-x 8 ' a

inserts into the current buffer

  á\341\341\341á

whereas in GNU Emacs 22.1.1 typing the same correctly inserts

  ááááá

The command `self-insert-command' in Emacs 23 inserts the first
and the last characters without any modifications, but applies
the following conversion for the remaining characters:

	/* Add the offset to the character, for Finsert_char.
	   We pass internal_self_insert the unmodified character
	   because it itself does this offsetting.  */
	if (! NILP (current_buffer->enable_multibyte_characters))
	  modified_char = unibyte_char_to_multibyte (modified_char);

Commenting out the above 2 lines produces the correct result.
However, I'm not sure what is the right fix.

-- 
Juri Linkov
http://www.jurta.org/emacs/



Merged 4037 4240. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Wed, 26 Aug 2009 01:25:06 GMT) Full text and rfc822 format available.

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Fri, 28 Aug 2009 08:55:10 GMT) Full text and rfc822 format available.

Notification sent to Juri Linkov <juri <at> jurta.org>:
bug acknowledged by developer. (Fri, 28 Aug 2009 08:55:11 GMT) Full text and rfc822 format available.

Message #12 received at 4037-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Kenichi Handa <handa <at> m17n.org>
Cc: monnier <at> iro.umontreal.ca, 4240-done <at> debbugs.gnu.org,
        deniz.a.m.dogan <at> gmail.com, 4037-done <at> debbugs.gnu.org
Subject: Re: bug#4240: 23.1.50; C-u doesn't work with Swedish characters
Date: Fri, 28 Aug 2009 11:52:21 +0300
> From: Kenichi Handa <handa <at> m17n.org>
> Cc: eliz <at> gnu.org, 4240 <at> emacsbugs.donarmstrong.com, deniz.a.m.dogan <at> gmail.com
> Date: Thu, 27 Aug 2009 15:23:25 +0900
> 
> In article <jwvocq14zlk.fsf-monnier+emacsbugreports <at> gnu.org>, Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
> 
> >>> > Please see bug#4037:
> >>> > http://debbugs.gnu.org/cgi/bugreport.cgi?bug=4037
> >>> > 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.
> 
> > I believe you're right.  Nowadays, the keyboard-decoding should always
> > take place before we get to that point.
> 
> Sorry for the late responce on this matter.  Yes, that
> unibyte->multibyte conversion is not necessary.  I've just
> installed a fix.

Thanks.  I'm closing the two related bug reports.



Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Fri, 28 Aug 2009 08:55:11 GMT) Full text and rfc822 format available.

Notification sent to Deniz Dogan <deniz.a.m.dogan <at> gmail.com>:
bug acknowledged by developer. (Fri, 28 Aug 2009 08:55:12 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> emacsbugs.donarmstrong.com. (Fri, 25 Sep 2009 14:24:20 GMT) Full text and rfc822 format available.

This bug report was last modified 15 years and 327 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.