Puzzled by code pages

Kelly luxuryownerKelly at hotmail.com
Fri May 14 22:24:03 EDT 2010


Buy high quality TAG Heuer Tiger Woods Golf Watches at low price, you can 
not believe, but it is true.

There are two models on 
http://www.luxuryowner.net/Replica-TAG-Heuer-Tiger-Woods-Golf-Watches.html

White: Tag Heuer Tiger Woods Golf White Mens Watch WAE1112.FT6008:
http://www.luxuryowner.net/Replica-Tag-Heuer-Tiger-Woods-Golf-White-Mens-Watch-WAE1112.FT6008.html

Black: Tag Heuer Tiger Woods Golf Black Mens Watch WAE1111.FT6004
http://www.luxuryowner.net/Replica-Tag-Heuer-Tiger-Woods-Golf-Black-Mens-Watch-WAE1111.FT6004.html

More replica watches you can refer: http://www.luxuryowner.net/

"Adam Tauno Williams" <awilliam at whitemice.org> дÈëÏûÏ¢ÐÂÎÅ:mailman.193.1273883243.32709.python-list at python.org...
> I'm trying to process OpenStep plist files in Python.  I have a parser
> which works, but only for strict ASCII.  However plist files may contain
> accented characters - equivalent to ISO-8859-2 (I believe).  For example
> I read in the line:
>
>>>> handle = open('file.txt', 'rb')
>>>> data = handle.read()
>>>> handle.close()
>>>> data
> '    "skyp4_filelist_10201/localit\xc3\xa0 termali_sortfield" =
> NSFileName;\n'
>
> What is the correct way to re-encode this data into UTF-8 so I can use
> unicode strings, and then write the output back to ISO8859-?
>
> I can read the file using codecs as ISO8859-2, but it still doesn't seem
> correct.
>
>>>> handle = codecs.open('file.txt', 'rb', encoding='iso8859-2')
>>>> data = handle.read()
>>>> handle.close()
>>>> data
> u'    "skyp4_filelist_10201/localit\u0102\xa0 termali_sortfield" =
> NSFileName;\n'
>
> 





More information about the Python-list mailing list