weird UNICODE problem
-
Hello, I just added UNICODE support to my App and it fails to work properly. Even simple string assignments fail, I always end up with one (the first) character. example,
CString s; s = _T("Test");
Now s seems to be 'T'. What's going on here? -
Hello, I just added UNICODE support to my App and it fails to work properly. Even simple string assignments fail, I always end up with one (the first) character. example,
CString s; s = _T("Test");
Now s seems to be 'T'. What's going on here?Try defining both
UNICODE
and_UNICODE
in the predefined macros section. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo -
Hello, I just added UNICODE support to my App and it fails to work properly. Even simple string assignments fail, I always end up with one (the first) character. example,
CString s; s = _T("Test");
Now s seems to be 'T'. What's going on here?I think the problem is in your output of the value. There are two things to remember: 1. Unicode handling is mostly limited to NT/2000 platforms. 2. If you use an ansi string function on a unicode string you will (very often) see that the function gets only the first byte of the 2 byte character. That is because the second byte is often 0x00. You say that you have added UNICODE support, does that mean that you have defined UNICODE?, then perhaps you could try defining _UNICODE as well. "After all it's just text at the end of the day. - Colin Davies "For example, when a VB programmer comes to my house, they may say 'does your pool need cleaning, sir ?' " - Christian Graus
-
Hello, I just added UNICODE support to my App and it fails to work properly. Even simple string assignments fail, I always end up with one (the first) character. example,
CString s; s = _T("Test");
Now s seems to be 'T'. What's going on here? -
Hello, I just added UNICODE support to my App and it fails to work properly. Even simple string assignments fail, I always end up with one (the first) character. example,
CString s; s = _T("Test");
Now s seems to be 'T'. What's going on here?van Padoea wrote: Now s seems to be 'T'. What's going on here? Did you see this in the debugger? Check the "Tools/Options/Debug/Display unicode strings" option My latest article: SQL Server DO's and DONT's[^]
-
van Padoea wrote: Now s seems to be 'T'. What's going on here? Did you see this in the debugger? Check the "Tools/Options/Debug/Display unicode strings" option My latest article: SQL Server DO's and DONT's[^]
Doh, thank you! There was nothing wrong!