Programming Question -- Reguaring unicode (and an interesting screenshot . . .)

Chu

Banned
Jan 2, 2001
2,911
0
0
I am trying to figure out how to deal with unicode in Win32 (with Petzold's help), and, well . . .

How the hell do you go from my code to this . . .

I do realize that y is not null terminated, but I assume that MessageBox is smart enough to go "hey, that's a char, not a string" but with my expirence in C . . .

Anyways, from reading Petzold I get the basic idea how to work with unicode, but I cannot figure out anywhere how to do the most basic thing -- actuially stick unicode in my TCHAR's and TSTRING's. I know in unixland \u is the escape character for it, but VC++ doesn't like that escape char (and yes, I tried /u if i'm getting it backwards).

Any help?

P.S. -- Sorta odd that VC++ will compile a program with unicode in it happily, but will refuse to save the file.
 

bsobel

Moderator Emeritus<br>Elite Member
Dec 9, 2001
13,346
0
0
The bug has nothing to do with unicode, the message body test your passing to MessageBox is the address of string "a" plus the ascii value of 'a'. That is a bogus address. You seem to be treating the c char pointers as c++ or java string objects (where something like string + string would be legal)

Bill