From: Eli Zaretskii <eliz@gnu.org>
To: Juri Linkov <juri@jurta.org>, 4240@emacsbugs.donarmstrong.com
Cc: deniz.a.m.dogan@gmail.com
Subject: bug#4240: 23.1.50; C-u doesn't work with Swedish characters
Date: Sun, 23 Aug 2009 23:40:00 +0300 [thread overview]
Message-ID: <833a7ifen3.fsf@gnu.org> (raw)
In-Reply-To: <87ljlas6nn.fsf@mail.jurta.org>
> From: Juri Linkov <juri@jurta.org>
> Date: Sun, 23 Aug 2009 21:54:04 +0300
> Cc: 4240@emacsbugs.donarmstrong.com
>
> > I hit "C-u ä" expecting it to come out as "ääää". Instead it comes out
> > as "ä\344\344ä". I try "C-u C-u ä" and it comes out as "ä" followed by
> > fourteen "\344" and then a trailing "ä". This happens no matter which
> > 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, all
> > of the other ones are "broken".
>
> Please see bug#4037:
> http://emacsbugs.donarmstrong.com/cgi-bin/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.
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.
next prev parent reply other threads:[~2009-08-23 20:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <83fxbccoca.fsf@gnu.org>
2009-08-04 19:27 ` bug#4037: Characters garbled in self-insert-command Juri Linkov
2009-08-28 8:55 ` bug#4037: marked as done (Characters garbled in self-insert-command) Emacs bug Tracking System
2009-08-23 13:28 ` bug#4240: 23.1.50; C-u doesn't work with Swedish characters Deniz Dogan
2009-08-23 18:54 ` Juri Linkov
2009-08-23 20:40 ` Eli Zaretskii [this message]
2009-08-26 17:08 ` Eli Zaretskii
2009-08-27 5:04 ` Stefan Monnier
2009-08-27 6:23 ` Kenichi Handa
2009-08-28 8:55 ` bug#4240: marked as done (23.1.50; C-u doesn't work with Swedish characters) Emacs bug Tracking System
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=833a7ifen3.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=4240@emacsbugs.donarmstrong.com \
--cc=deniz.a.m.dogan@gmail.com \
--cc=juri@jurta.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.