Click here to Skip to main content
15,887,027 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: WIN32 Console application colour ? Pin
James Brown28-Aug-06 2:35
James Brown28-Aug-06 2:35 
GeneralRe: WIN32 Console application colour ? Pin
James Laing28-Aug-06 3:54
James Laing28-Aug-06 3:54 
GeneralRe: WIN32 Console application colour ? Pin
James Brown28-Aug-06 4:13
James Brown28-Aug-06 4:13 
GeneralRe: WIN32 Console application colour ? Pin
James Laing28-Aug-06 9:50
James Laing28-Aug-06 9:50 
GeneralRe: WIN32 Console application colour ? Pin
James Brown28-Aug-06 10:39
James Brown28-Aug-06 10:39 
GeneralRe: WIN32 Console application colour ? Pin
James Laing28-Aug-06 11:41
James Laing28-Aug-06 11:41 
GeneralRe: WIN32 Console application colour ? Pin
Laing,James28-Aug-06 11:59
Laing,James28-Aug-06 11:59 
QuestionI hate Unicode!! Pin
Waldermort26-Aug-06 10:24
Waldermort26-Aug-06 10:24 
Why does it have to be so complex? I'm still trying to convert my code but I have ran into a brick wall. I'm reading UTF16 encoded strings from a byte array, most of these strings are Chinese simplified. So for a MBCS I use this

WideCharToMultiByte(936/* GB_2312 */,0,(unsigned short *)data,length/2,text,length+1,NULL,NULL);

The data member there is a pointer within this array. This works, it gives me a string of Multibyte characters. Here is the first character: 0xB0 0xB6. Now, for a unicode build, I should be able to read directly from the array: 0x73ED. According to my charmap utility, this is the correct value for this character. But all I see is "?". Ok, try converting the first multibyte result back to wide:

MultiByteToWideChar(CP_ACP,0,text,length,lpW,length+1);

Exactly the same result: 0x73ED. But I am still not seeing it. Lets try the other, simpler, multi to wide function:

mbstowcs(lpW,text,length);

This time the output is a little different: 0x00B0 0x00E0, and I can see it.
Can anybody explain what is going on here?
AnswerRe: I hate Unicode!! Pin
Michael Dunn26-Aug-06 21:27
sitebuilderMichael Dunn26-Aug-06 21:27 
GeneralRe: I hate Unicode!! [modified] Pin
Waldermort26-Aug-06 22:08
Waldermort26-Aug-06 22:08 
GeneralRe: I hate Unicode!! [modified] Pin
fefe.wyx26-Aug-06 22:24
fefe.wyx26-Aug-06 22:24 
GeneralRe: I hate Unicode!! Pin
Waldermort26-Aug-06 22:48
Waldermort26-Aug-06 22:48 
GeneralRe: I hate Unicode!! Pin
fefe.wyx26-Aug-06 23:33
fefe.wyx26-Aug-06 23:33 
GeneralRe: I hate Unicode!! Pin
Waldermort27-Aug-06 0:27
Waldermort27-Aug-06 0:27 
QuestionRegistry Unicode Problem Pin
lucki_luke26-Aug-06 9:55
lucki_luke26-Aug-06 9:55 
AnswerRe: Registry Unicode Problem Pin
Mike Dimmick26-Aug-06 11:09
Mike Dimmick26-Aug-06 11:09 
Questionreading values within std::list types Pin
jon-8026-Aug-06 8:34
professionaljon-8026-Aug-06 8:34 
AnswerRe: reading values within std::list types Pin
Waldermort26-Aug-06 9:23
Waldermort26-Aug-06 9:23 
GeneralRe: reading values within std::list types Pin
jon-8026-Aug-06 10:40
professionaljon-8026-Aug-06 10:40 
GeneralRe: reading values within std::list types Pin
Waldermort26-Aug-06 10:53
Waldermort26-Aug-06 10:53 
AnswerRe: reading values within std::list types [modified] Pin
Mike Danberg27-Aug-06 17:53
Mike Danberg27-Aug-06 17:53 
QuestionOperating system info Pin
Kiran Pinjala26-Aug-06 8:29
Kiran Pinjala26-Aug-06 8:29 
AnswerRe: Operating system info Pin
Mike Dimmick26-Aug-06 9:47
Mike Dimmick26-Aug-06 9:47 
Questionconverting str::string to const char* Pin
jon-8026-Aug-06 8:03
professionaljon-8026-Aug-06 8:03 
AnswerRe: converting str::string to const char* Pin
Pierre Leclercq26-Aug-06 8:34
Pierre Leclercq26-Aug-06 8:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.