from Tkinter import*
Label(text=u'\u2208').pack()
mainloop()

i am trying to do that same in Wx, but i always get UnicodeError:

import wx
okno = wx.App(0)
frame=wx.Frame(None)
wx.StaticBox(frame,label=u'\u2208')
frame.Show(True)
okno.MainLoop()

and the eror is:

Traceback (most recent call last):
  File "C:\Documents and Settings\Blu\Plocha\aa.py", line 4, in -toplevel-
    wx.StaticBox(frame,label=u'\u2208')
  File "C:\Python24\lib\site-packages\wx-2.6-msw-ansi\wx\_controls.py", line 1016, in __init__
    newobj = _controls_.new_StaticBox(*args, **kwargs)
  File "C:\Python24\lib\encodings\cp1250.py", line 18, in encode
    return codecs.charmap_encode(input,errors,encoding_map)
UnicodeEncodeError: 'charmap' codec can't encode character u'\u2208' in position 0: character maps to <undefined>

do you know what is the problem?

Thanks for all post

Recommended Answers

All 4 Replies

wxPython comes in an ansi and a unicode version, you need to install the unicode version.

wxPython comes in an ansi and a unicode version, you need to install the unicode version.

ye, i downloaded it, and now it works fine. Thanks;)

Glad it works now! Actually the ansi version is just mildly smaller than the more generally useful unicode version, so I don't know why the wxPython folks even bothered with the ansi version.

i asked my friend and he sad: Some OS dont support Unicede.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.