hey,
is it possible to make msvc6 interpret all literal strings in the code as unicode strings? if i #define UNICODE then all the literal strings blow up.
thanks.
(edit: without using the TEXT() macro. i'm trying to save time )
hey,
is it possible to make msvc6 interpret all literal strings in the code as unicode strings? if i #define UNICODE then all the literal strings blow up.
thanks.
(edit: without using the TEXT() macro. i'm trying to save time )
Last edited by reanimated; 01-01-2004 at 10:46 AM.
try L before the string e.g.
something = L "some string"
"L" is for Literal
hope that helps?
i guess i didn't explain myself properly. a friend came up with a solution, but thanks for trying anyway
oh, sure. its actually really simple and not particulary good.
what i had was this situation:
i had lots of existing code using literal strings, eg:
(btw, am i right calling these literal strings?)Code:SetName( "bob", "smith");
I wanted to convert to unicode, since most pcs now use winXP.
so, i needed to change this to:
the solution? initially find and replace . I am also working on a program that will read .cpps and change all its strings correctly, hopefully leaving things such as #include "resource.h" intact. I could post it here when its done. tis a shame MSVC can't be made to do it automatically though when the -UNICODE compile option is used.Code:SetName(TEXT("bob"). TEXT("smith"));
Now when someone stumbles on to this thread, they may learn something
For those wondering, the TEXT() macro will put an "L" in front of the string literal parameter if _UNICODE is defined - making it a wide character string.
I've had to port my code to CE in the past, a prgram like that would've been nice to have at the time
gg