From: Eli Zaretskii <eliz@gnu.org>
To: Vladimir Prus <vladimir@codesourcery.com>
Cc: gdb@sources.redhat.com
Subject: Re: Sevenbit-strings only partially respected?
Date: Sat, 09 Oct 2010 21:05:00 -0000 [thread overview]
Message-ID: <83k4lrm611.fsf@gnu.org> (raw)
In-Reply-To: <i8qgtp$89t$1@dough.gmane.org>
> From: Vladimir Prus <vladimir@codesourcery.com>
> Date: Sat, 09 Oct 2010 23:48:12 +0400
>
> > if (c < 0x20 || /* Low control chars */
> > (c >= 0x7F && c < 0xA0) || /* DEL, High controls */
> > (sevenbit_strings && c >= 0x80))
> > {/* high order bit set */
> >
> > Apparently, the second condition fires and causes 0xD0 to be quoted. Is
> > this expected behaviour?
>
> Doh. Of course 0xD0 is larger than 0xA0. The value that causes the actual
> problem is 0x83. Russian letter 'Ñ' is encoded in UTF8 as 0xD1 0x83, and
> because of the above code, strings with that letter (and some other letters)
> get messed up completely.
That `(c >= 0x7F && c < 0xA0)' condition assumes ISO-8859-n encodings
(probably was coded for 8859-1), and should not be used with anything
else.
next prev parent reply other threads:[~2010-10-09 21:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-09 19:26 Vladimir Prus
2010-10-09 19:48 ` Vladimir Prus
2010-10-09 21:05 ` Eli Zaretskii [this message]
2010-10-12 17:44 ` Tom Tromey
2010-10-13 1:50 ` Tom Tromey
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=83k4lrm611.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=gdb@sources.redhat.com \
--cc=vladimir@codesourcery.com \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox