Tony Duff
2009-09-21 07:18:01 UTC
I have wordprocessor that I develop and compile in English under English Vista.
I use the edit controls available in the Windows SDK for various dialogues.
I load text into the Window using SetWindowText and retrieve the text using
GetWindowText. (Both items are the single character ANSI versions, not the W
versions for double-byte.
The compiled program works perfectly well under English and other European
language Windows. However, there is a problem under Chinese Windows whenever
the character set into the control is over decimal 126. For example, I load
a single character decimal 204 into the control. When I retrieve it using
GetWindowsText under English Windows, I get back a string containing only the
single character decimal 204 terminated with a null character, as expected.
Under Chinese Windows, the exact same code results in a string beginning with
a ? question mark and followed by about 13 apparently random characters.
Can anyone explain why this would be and as a result what the fix would be?
Thanks,
Tony Duff
I've got an RTF import method in my wordprocessing program.
I'm trying to add the ability to read in files created in Chinese versions
of Windows. I have taken care of the Unicode aspect but I need to take care
of the older system that uses double characters and high codes with composite
fonts.
For instance, the RTF code contains
\dbch\'co\'ao
I understand this is a double byte character but it is not a unicode. So,
once I have obtained these two charactersOnce I incorporate these letters
into my program, what is the right way to display them so that the correct
Chinese letter displays? Do I send them to textout as a string of two
characters, one after the other just as I received them with the appropriate
font and character set selected? Or what?
Thanks for your help,
Tony Duff
I use the edit controls available in the Windows SDK for various dialogues.
I load text into the Window using SetWindowText and retrieve the text using
GetWindowText. (Both items are the single character ANSI versions, not the W
versions for double-byte.
The compiled program works perfectly well under English and other European
language Windows. However, there is a problem under Chinese Windows whenever
the character set into the control is over decimal 126. For example, I load
a single character decimal 204 into the control. When I retrieve it using
GetWindowsText under English Windows, I get back a string containing only the
single character decimal 204 terminated with a null character, as expected.
Under Chinese Windows, the exact same code results in a string beginning with
a ? question mark and followed by about 13 apparently random characters.
Can anyone explain why this would be and as a result what the fix would be?
Thanks,
Tony Duff
I've got an RTF import method in my wordprocessing program.
I'm trying to add the ability to read in files created in Chinese versions
of Windows. I have taken care of the Unicode aspect but I need to take care
of the older system that uses double characters and high codes with composite
fonts.
For instance, the RTF code contains
\dbch\'co\'ao
I understand this is a double byte character but it is not a unicode. So,
once I have obtained these two charactersOnce I incorporate these letters
into my program, what is the right way to display them so that the correct
Chinese letter displays? Do I send them to textout as a string of two
characters, one after the other just as I received them with the appropriate
font and character set selected? Or what?
Thanks for your help,
Tony Duff