I’ve encountered the problem of binary data file reading. I use the root interpreter installed on Vista (all current updates done) and Ubuntu 8.04 — Hardy Heron.
The binary data file is the sequence of 512 byte of comments and 8192 integers with the length of 4 byte. I need only the comments and first 1024 integers.
This macros executed on the Ubuntu machine works correctly. But in the Vista machine only first part of the file (first 800 byte) is reading properly and the rest are strange overflow with value about 1.5 billion.
Could someone help me to understand how to fix it?
I’ve encountered the problem of binary data file reading. I use the root interpreter installed on Vista (all current updates done) and Ubuntu 8.04 — Hardy Heron.
The binary data file is the sequence of 512 byte of comments and 8192 integers with the length of 4 byte. I need only the comments and first 1024 integers.
This macros executed on the Ubuntu machine works correctly. But in the Vista machine only first part of the file (first 800 byte) is reading properly and the rest are strange overflow with value about 1.5 billion.
Could someone help me to understand how to fix it?[/quote]
Try opening the file as binary stream rather than text.