[wxPython-users] unicode handling

Josiah Carlson jcarlson at uci.edu
Wed Aug 2 22:10:46 PDT 2006


"Thomas Thomas" <thomas at mindz-i.co.nz> wrote:
> >If you have control over writing data, I would
> >suggest writing to utf-8
> say I have a variable 
> 
> >>>c='ENERGY SCOPE \xa3500'
> >>>d=u'ENERGY SCOPE \xa3500'
> >>>f=u'ENERGY SCOPE \xa3500'
> is there any way i could make c to unicode type so that i could do something like c==d
> and doesn't raise an exception 


>>> d=u'ENERGY SCOPE \xa3500'
>>> c = 'ENERGY SCOPE \xa3500'
>>> c.decode('latin-1') == d
True
>>>

 - Josiah





More information about the wxpython-users mailing list