Codepage and Font

P

Peter

Hi,

we are using Visual Studio 6.0 with MFC6 on an XP computer. The app is not
Unicode. OS is a german one and an english one.

I found a problem that in a combobox the strings are not shown properly when
I switch over to cyrillic letters.
This is done by setting the regional settings parameter "language for non
Unicode dialogs" to russian and reboot.

In the list box part of the combobox the letters are shown correctly but in
the edit box part of the combobox the selected string is shown wrong.
The Bytes that shows up the cyrillic letters are decoded not by the 1251
codepage but , I do not know why, by the 1252 codepage. So the string itself
is correctly read out of the russian part of the stringtable or out of the
list box part of the combobox. But the Bytes are linked to the wrong
characters.
The locale of the combobox o.k.

The problem might be that I create a font for that combobox: "arial",
FW_BOLD, .... This font seem to be shown correctly.
So when I use that font, the decoding goes wrong in the edit box.
But when I do not use that font with the combobox, the decoding goes right
and the editbox shows up cyrillic letters.
But the one created font is used by the list box and the edit box, or isn't
it.
How can a font does the right thing in the list box part and the wrong thing
in the edit box part of a combobox?
My understanding is that when I create a font, the font has one characterset
and not two different.
What regestry key can mess up this control ?

Any help to understand what is going on ?

Thanks
Peter
 
P

Peter

Some additional information to define the problem a bit more detailed.

When I write a cyrillic text to a ListBox, the cyrillic text appears, no
matter if I set a font or not.
When I write the same text to an EditBox without setting a font it apperas
also correctly.
But when I write the same text to a EditBox and specifying a font it apperas
incorrectly.

What the hell is different when showing a text in an EditBox and in a
ListBox?
Is there any transforming included that might use the wrong codepage ?
Any idea ?
 
P

Peter

Sorry,

I forgot to tell you that this feature is running correctly on a XP RPO
computer for years now. But I got this problem on a XPe installation.
So my idea is that some Codepage setting is not complete in this Xpe
installation. But I have no idea what.
I heard something about the "Font Application Compatibility Macro". Could
that tool help ?

Peter
 
S

SD

Sorry,

I forgot to tell you that this feature is running correctly on a XP RPO
computer for years now. But I got this problem on a XPe installation.
So my idea is that some Codepage setting is not complete in this Xpe
installation. But I have no idea what.
I heard something about the "Font Application Compatibility Macro". Could
that tool help ?

Peter

Funny, I think I'm fighting a similar problem. One of our internal
apps shows the micron (µ) and degree (º) characters as funny Korean
characters. The same program displays normally under XPPro and under
our previous build of XPe (with minimal components). Since I rebuilt
our XPe based on the XPPro Emulator script I get these strange
characters for micron and degree.
 
S

SD

Sorry,

I forgot to tell you that this feature is running correctly on a XP RPO
computer for years now. But I got this problem on a XPe installation.
So my idea is that some Codepage setting is not complete in this Xpe
installation. But I have no idea what.
I heard something about the "Font Application Compatibility Macro". Could
that tool help ?

Peter

Funny, I think I'm fighting a similar problem. One of our internal
apps shows the micron (µ) and degree (º) characters as funny Korean
characters. The same program displays normally under XPPro and under
our previous build of XPe (with minimal components). Since I rebuilt
our XPe based on the XPPro Emulator script I get these strange
characters for micron and degree.
 
S

Sean Liming \(MVP\)

Okay. Now we are talking about the right OS.

In FP2007, there is a Codepage Application Compatibility and Fonts
Application Compatibility macro components that are available. Adding these
two could solve the problem.
--
Regards,

Sean Liming
www.sjjmicro.com / www.seanliming.com
Book Author - XP Embedded Advanced, XP Embedded Supplemental Toolkit
 
H

Harriet

Hi Peter,

I am sorry that you were having problems with different code page encoding.
Did the macro components Sean Liming suggested solve the problem?

Thanks,
Harriet
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top