Need help on UNICODE conversion
Erik Max Francis
max at alcyone.com
Sat Sep 6 18:00:37 EDT 2003
Bernd Preusing wrote:
> I have a JPG file which contains some comment as unicode.
>
> After reading in the string with s=file.read(70) from file offest 4
> I get a string which is shown as
> 'UNICODE\\0x00\\ox00K\\0x00o' and so forth in the debugger
> (using Komodo).
As others have pointed out, this seems to be an unfaithful cut and
paste; to really tell what it is we'd have to see the actual contents of
the string. If it is really Unicode, however, it looks like it might be
a UTF-16 encoding. Try 'utf-16' for the encoding name.
--
Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
__ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
/ \ You're wasting time / Asking what if / You linger on too long
\__/ Chante Moore
More information about the Python-list
mailing list