Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Vladimir Prus <vladimir@codesourcery.com>
To: gdb@sources.redhat.com
Subject: Re: Sevenbit-strings only partially respected?
Date: Sat, 09 Oct 2010 19:48:00 -0000	[thread overview]
Message-ID: <i8qgtp$89t$1@dough.gmane.org> (raw)
In-Reply-To: <201010092326.36112.ghost@cs.msu.su>

Vladimir Prus wrote:

> 
> I've run into a situation where setting 'print sevenbit-strings' of off still
> does not prevent GDB from escaping some characters. Specifically,
> consider the character 0xD0, and this bit in printchar:
> 
>   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.

Can we please have that

	(c >= 0x7F && c < 0xA0)

clause ripped off?

Thanks,
Volodya



  reply	other threads:[~2010-10-09 19:48 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 [this message]
2010-10-09 21:05   ` Eli Zaretskii
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='i8qgtp$89t$1@dough.gmane.org' \
    --to=vladimir@codesourcery.com \
    --cc=gdb@sources.redhat.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