This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Printing of strings with special characters
>>>>> "Anton" == Anton Kunze <ak@technosis.de> writes:
Anton> -------------------------------------------------------
Anton> std::string strTest = "hÃhÃhÃ";
Anton> const char* szTest = "hÃhÃhÃ";
Anton> --------------------------------------------------------
This works fine for me...
Anton> my gdbinit:
Anton> ---------------------------------------------------------
Anton> set target-charset UTF-32
This setting doesn't make sense.
Anton> set target-wide-charset UTF-32
In the most normal case on Linux, where you are doing "gdb program" and
then "run", you should simply not set these at all, because the defaults
are going to be correct: the target wide charset default is UTF-32,
which is what glibc always uses, and the target charset default will
come from your locale.
Your example works fine for me.
(gdb) p szTest
$2 = 0x80487a4 "hÃhÃhÃ"
Try again with "gdb -nx". If that doesn't work, then maybe there is a
bug.
Tom