[wxPython-users] unicode handling
Thomas Thomas
thomas at mindz-i.co.nz
Wed Aug 2 22:04:08 PDT 2006
>If you have control over writing data, I would
>suggest writing to utf-8
Na the file is something i receive extenally and dropped into a specific lo=
cation from where the application reads..
it will be as starightforward as copying and pasting the content below onto=
notepad =
------------------------
string MetaDataPrompt =3D "Discovery No";
string MetaDataFieldName =3D "Discovery No";
string MetaDataType =3D "string";
string MetaDataValue =3D "=A3500";
string MetaDataPrompt =3D "comments";
string MetaDataFieldName =3D "Comments";
string MetaDataType =3D "string";
string MetaDataValue =3D "Energy Scope =A3500";
-----------------------------------------------------
and try reading it from that file..
say I have a variable =
>>>c=3D'ENERGY SCOPE \xa3500'
>>>d=3Du'ENERGY SCOPE \xa3500'
>>>f=3Du'ENERGY SCOPE \xa3500'
is there any way i could make c to unicode type so that i could do somethin=
g like c=3D=3Dd
and doesn't raise an exception =
I know d=3D=3Df works fine..
>>> c=3D=3Dd
Traceback (most recent call last):
File "<stdin>", line 1, in ?
UnicodeDecodeError: 'ascii' codec can't decode byte 0xa3 in position 13: or=
dinal not in range(128)
cheers
Thomas Thomas
thomas at mindz-i.co.nz
Phone. +64 7 855 8478
Fax. +64 7 855 8871
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/200608=
03/5cbb5575/attachment.htm
More information about the wxpython-users
mailing list