[wxPython] National character set

I'm developping a small application, where I try to avoid hard-coding texts. I've made a simple system so that I dynamically load the correct text (according to a language setting).

In norwegian we have some special characters (æøå, ÆØÅ), however using these on buttons or any other control (static text) does not produce the expected result.

Does anyone know how / what I have to do so that in a wxPython based application I can use national characters.

Thanks for any help.
Nikolai Kirsebom

Example below:

wxButton(panel, SOME_ID, "Måned", wxPoint(4, 80))

···

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/wxpython-users

I'm developping a small application, where I try to avoid hard-coding

texts. I've made a simple system so that I dynamically load the correct
text (according to a language setting).

In norwegian we have some special characters (æøå, ÆØÅ), however using

these on buttons or any other control (static text) does not produce the
expected result.

Does anyone know how / what I have to do so that in a wxPython based

application I can use national characters.

I don't know much about it myself, but look at the docs for
wxFont.SetDefaultEncoding (it's a static method in C++ so it's actually
called "wxFont_SetDefaultEncoding" in Python.) There is also a Font
Encoding Overview in the docs. You can set the encoding explicitly on each
font, or set the default for all fonts in the process. I imagine then that
you'll just have to create a font that supports the desired encoding and
SetFont the control.

If it doesn't work let me know and I'll do some digging.

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com
http://wxPython.org Java give you jitters?
http://wxPROs.com Relax with wxPython!

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/wxpython-users