This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: printing wchar_t*

>>>>> "Eli" == Eli Zaretskii <> writes:

 >> From: Vladimir Prus <> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]