ComboBox encoding weirdness?

This was my problem 3 days ago. After I changed all strings to unicode strings with 'u' prefix the problem disappeared. Until then UnicodeDecodeError bite me randomly, mostly combobox strings.

I think unicode version of wxPython is vulnarable to strings other than unicode.

Murat

v 2.6.0-unicode, MSW XP sp2

Pierre Hjälm wrote:

···

I started to move my project over to python 2.4 but realised I had changed
sitecustomize.py to set the encoding to the default encoding in python 2.3

Wishing to get rid of this I used wx.SetDefaultPyEncoding("iso8859-1") as
the first line in my program.

Despite this, I get the following:

   wx.ComboBox.__init__(self,parent,self.id,default,pos,size,choices,style=wx.CB_READONLY)
File "/usr/local/src/wxPython-src-2.6.0.0/wxPython/wx/_controls.py", line 581, in __init__
   newobj = _controls_.new_ComboBox(*args, **kwargs)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xf6 in position 5: ordinal not in range(128)

huh? 'ascii'?

All other controls (the ones I use, at least :wink: work fine with iso8859-1
characters.

Am I missing something painfully obvious?

This is under linux/wxgtk.