Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Anton Kunze <ak@technosis.de>
Cc: gdb@sourceware.org
Subject: Re: Printing of strings with special characters
Date: Thu, 04 Mar 2010 21:25:00 -0000	[thread overview]
Message-ID: <4B902521.4050602@technosis.de> (raw)
In-Reply-To: <m34okw2c2g.fsf@fleche.redhat.com>

Tom Tromey schrieb:
>>>>>> "Anton" == Anton Kunze <ak@technosis.de> writes:
>>>>>>             
>
> Anton> i'am using gdb 7.0.1 with python and pretty printing on suse linux. If I
> Anton> try to print string with german special characters I get only strings as
> Anton> '\nnn'.
>
> Anton> My gdbinit file contains following:
> Anton> set charset ISO-8859-1
> Anton> set target-wide-charset ISO-8859-1
>
> This is almost certainly wrong.  You probably want `set
> target-wide-charset UTF-32' -- which is the default on Linux.  At least,
> that will be what you want if your code is using wchar_t.
>
> Also, I recommend against using "set charset"; use target-charset
> instead.  'set charset' sets the host charset in addition to the target
> charset, but on systems with a decent locale implementation, you
> basically will always want to use the result reported by the locale.
>
> Anton> sys.path.insert(0, '/home/anton/projects/debug/printers')
>
> Without the source to this we can't be completely sure about the
> problem.
>
> Anton> Within my debug session I use the following commonds on gdb console:
>
> Anton> set print sevenbit-strings off
> Anton> print qsHtml
> Anton> $4 = "h\366h\366h\366"
>
> What type is a qsHtml?  Specifically, what is the underlying character
> type it uses?
>
> Tom
>
>
>   
Hello Tom,
I will try tomorrow your examples for charset . The variable "qsHtml" is 
an QString and I'am using the kdevelop python pretty printers on eclipse 
cdt 
(http://websvn.kde.org/trunk/extragear/sdk/kdevelop/debuggers/gdb/printers/).
"std::string" and "const char*" has the same problem with special 
characters. It doesn't matter if I use python pretty printer or not.

best regards


  reply	other threads:[~2010-03-04 21:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-04 11:57 Anton Kunze
2010-03-04 18:09 ` Tom Tromey
2010-03-04 21:25   ` Anton Kunze [this message]
2010-03-05  8:33   ` Anton Kunze
2010-03-05 15:41     ` Tom Tromey
2010-03-08  9:00       ` Anton Kunze
2010-03-08 18:03         ` Tom Tromey
2010-03-09  7:49           ` Anton Kunze
2010-03-08 19:41         ` Tom Tromey
2010-03-09  7:54           ` Anton Kunze
2010-03-09 19:56             ` Niko Sams
2010-03-09 10:29           ` André Pönitz

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=4B902521.4050602@technosis.de \
    --to=ak@technosis.de \
    --cc=gdb@sourceware.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox