Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Seeing unicode strings in watch window

Status
Not open for further replies.

SDowd

Programmer
Nov 11, 2005
91
US
does anyone know how to setup visual studio so that in the watch boxes rather than looking at a bunch of hex values for unicode strings, i can see the actual string/value.
thanks in advance
steve
 
Check your compiler setting for wchar_t. It should be treated as a basic type, otherwise Unicode strings are arrays of short and you will just get a bunch of hex numbers.
 
if you want to write a wide character out you should use a wide stream. it appears that the "ý" prints because its actually the size of a char. casting it to a char defeats the purpose. i dont know what type of stream outfile is, but you may want to try with that, making it a wide stream object.
thats only a guess though, im not too familiar with using hex or unicode.

so maybe it would look like this:

outfile << 0x00FD << 0x039E;

i guess just by coincidence the "ý" fits into a char. i hope this helps. but like i said, im not too familiar with the subject.
good luck.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top