Re: How to make binary data portable?



PengYu.UT@xxxxxxxxx wrote:
Hi,

I write the content of a in file "data" (in Sun Machine). Then I read
"data" in both SunOS and linux. But the result is different. Do you
know how to make it binary data portable.

Binary numeric data is inherently not portable. If you want files to be portable, your best bet is to write numeric data as text. Even that assumes that the different implementations|platforms use a common form of encoding text. You will find that when transporting data from one implementation|platform to another you still need to consider whether you need to convert that data.
.




Relevant Pages

  • Re: "Torn between two OS" - Solaris vs Linux
    ... The actual operating system has always been ... > SunOS. ... > as the Linux vs. GNU/Linux naming war. ... SCO did it first... ...
    (linux.redhat)
  • Re: "Torn between two OS" - Solaris vs Linux
    ... The actual operating system has always been ... > SunOS. ... > as the Linux vs. GNU/Linux naming war. ... SCO did it first... ...
    (comp.os.linux.misc)
  • Re: "Torn between two OS" - Solaris vs Linux
    ... The actual operating system has always been ... > SunOS. ... > as the Linux vs. GNU/Linux naming war. ... SCO did it first... ...
    (comp.unix.solaris)
  • Re: SUN Solaris vs. Linux
    ... experience with Solaris. ... and SVR4-ish (Linux leans slightly more towards the ... but nowhere near as bad as SunOS). ... Don't confuse the desktop or hardware with the operating system ...
    (alt.linux)
  • Ubunu - Linux - Unicode - encoding
    ... I'm working on our project DrPython and try fix bugs in Linux, ... it works very good now with latin-1 encoding). ... On Windows, it works good now, using setappdefaultencoding and the right ... This would be the easiest solution, setappdefaultencoding, (getting it ...
    (comp.lang.python)