Tigran Łaczinian wrote:
Greetings.
I've developed recently an application using wxPython, now I'm trying
to add more languages to it and have some problem which I cannot solve
even after a week of googling and reading different manuals, so I've
decided to post it here.Generally I'm trying now to run Russian language and cyryllic encoding. I have
wxFont.SetDefaultEncoding(wxFONTENCODING_CP1251)
line in OnInit method, before any frame is created and any font is used.When application loads up, generally there is no text with cyrillic
encoding, only with my system one (cp1250) . But in one window, where
I have a couple of HyperLinkCtrl controls, the text on them is
displayed in correct (cyrillic) encoding. wxStaticTexts in that window
are displaying in wrong encoding. All controls in that window have the
same font (difference only that wxStaticText is bolded).
I've checked that text controls returns good encoding when trying
text.GetFont().GetEncoding() - but it didn't use it on the screen.
So it sounds to me like the native controls are all using the system encoding, but the generic ones (those implemented in wx itself, which draw their own text) such as HyperLinkCtrl are using the specified default encoding. Does that sound like what you are seeing? You can try some of the generic controls in wx.lib to verify.
Please either ask about this on wx-users, or enter a bug report (category == "wxMSW Specific") about it. That way somebody that knows more about how the font encodings are supposed to work in this situation will see this.
···
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!