Bug with win32 open and utf-16 file

Tim Roberts timr at probo.com
Wed Aug 27 23:07:20 EDT 2003


Tim Roberts <timr at probo.com> wrote:

>derek / nul <abuseonly at sgrail.org> wrote:
>>
>>>>>> data = file("c:/dash9.eng", "rb").read()
>>>>>> data[-10:]
>>>'\r\x00\n\x00)\x00\r\x00\n\x00'
>>
>>Interesting, I have just done the same and it would appear that the hexdump
>>routine is changing 0d to 0a ???
>
>I cut-and-pasted your version of hexdump onto my machine, fetched your
>dash9.eng file, and ran this:
>
>  from hexdump import hexdump
>  f = open('dash9.eng','rb').read()
>  print hexdump(f)
>
>The output seems to be exactly correct:

For those who have been following this thread, Derek and I had a private
e-mail exchange about this.  When I asked to send me the exact files he was
using, he discovered with some embarrassment that HIS version of his
dash9.eng had been modified during testing, and actually DID contain 0a 00
0a 00 0a 00 0a 00.  Problem solved.
-- 
- Tim Roberts, timr at probo.com
  Providenza & Boekelheide, Inc.




More information about the Python-list mailing list