Win32 font/encoding problem using UTF-8

Frank Aune Frank.Aune at broadpark.no
Tue May 22 09:58:43 PDT 2007


Hello,

wxpython version: wxpython-2.8-win32-unicode-2.8.3.0-py25.exe

I have an XRC file generated by XRCed which by default is coded in UTF-8. On 
Win32 if selecting "test window" in XRCed or when displaying the content of 
the XRC in a wxpython program, I get the following error (question):

"xrced: unknown encoding
No font for displaying text in encoding 'Unicode 8 bit (UTF-8)' found.
Would you like to select a font to be used for this encoding (otherwise the 
text in this encoding will not be shown correctly) ?"

It seems the problem is related to wxStaticText font changes made in XRCed:

<object class="wxStaticText" name="INFOPAGE_VERSION">
<label></label>
<style>wxALIGN_CENTRE</style>
<font>
<size>20</size>
<family>swiss</family>
<style>normal</style>
<weight>bold</weight>
<underlined>0</underlined>
<face>Sans</face>
<encoding>UTF-8</encoding>
</font>
</object>

More specificly the problem seems related to the <encoding> tag above which 
specifies UTF-8 encoding. If removing this tag, I get the expected behaviour.

Both the XRC and the wxpython program has UTF-8 as default encoding, and this 
error does not appear on GNU/Linux or Mac OSX - only Win32. The wxpython 
installation on Windows is Unicode version.

I appreciate any feedback at all on this problem, as I do not have regular 
access to a win32 plattform for testing and so far have been unable to find a 
solution. 

Best regards,
Frank Aune




More information about the wxpython-users mailing list