I am trying to exchange data between a unix machine and a PC. I have so
far tested sending and receiving char type data using binaryEncode and
binaryDecode It worked well. When I tried receiving float, int and
double on the PC the decode did not work. Floats and doubles are always
in host format, so there's no guarantee that they can be transferred
between machines of different architectures. Unfortunately, UNIX
machines and PCs have different architectures. Although there is an
option for ints to be encoded in network order when transferring data
between machines of different architectures. Neither binaryDecode("i"
... nor binaryDecode("n", ... worked.
When I changed the byte (character abc -> cba) order for the int and
double, the binaryDecode worked, although I have not yet tested it
extensively. When I changed the byte order for float the
binaryDecode("f", ... differed only in the 9th decimal place. I have not
yet tested it extensively.
This promises to get rather messy when passing structures. Does anyone
have advice on exchanging data between a UNIX machine and a PC? Your
help would be greatly appreciated.
Thanks
Jon Schwartz
Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.