Re: printing wchar_t*

Paul Koning
2006-04-14T13:43:09Z

>>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:

>> From: Vladimir Prus <ghost@cs.msu.su> Date: Fri, 14 Apr 2006
>> 10:01:57 +0400
>>
>> > What character set is used by the wide characters in the wchar_t
>> > arrays? GDB has some support for a few single-byte character
>> sets, > see the node "Character Sets" in the manual.
>>
>> Relatively safe bet would be to assume it's some zero-terminated
>> character set. I plan to assume it's either UTF-16 or UTF-32 in
>> the GUI (the conversion code is the same for both encodings), but
>> gdb can just print raw values.

Eli> We should get our terminology right: UTF-16 is not a character
Eli> set, it's an encoding (and a multibyte encoding, btw). As for
Eli> UTF-32, I don't think such a beast exists at all.

I seem to remember seeing it mentioned. It certainly makes sense.

Eli> I think you meant 16-bit Unicode characters (a.k.a. the BMP) and
Eli> 32-bit Unicode characters, respectively.

If you have 16 bit wide chars, it seems possible that those might
contain UTF-16 encoding of full (beyond BMP) Unicode characters.

paul