From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5409 invoked by alias); 4 Mar 2010 21:25:02 -0000 Received: (qmail 5372 invoked by uid 22791); 4 Mar 2010 21:25:00 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=BAYES_00,MISSING_HEADERS X-Spam-Check-By: sourceware.org Received: from wp151.webpack.hosteurope.de (HELO wp151.webpack.hosteurope.de) (80.237.132.158) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 04 Mar 2010 21:24:54 +0000 Received: from p5b10abc8.dip.t-dialin.net ([91.16.171.200]); authenticated by wp151.webpack.hosteurope.de running ExIM with esmtpa id 1NnIXL-0001PL-Gy; Thu, 04 Mar 2010 22:24:51 +0100 Message-ID: <4B902521.4050602@technosis.de> Date: Thu, 04 Mar 2010 21:25:00 -0000 From: Anton Kunze User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 CC: gdb@sourceware.org Subject: Re: Printing of strings with special characters References: <4B8F9FE9.2040401@technosis.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2010-03/txt/msg00032.txt.bz2 Tom Tromey schrieb: >>>>>> "Anton" == Anton Kunze 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