Re: How to make binary data portable?



On Thu, 30 Jun 2005 12:39:47 -0500, PengYu.UT@xxxxxxxxx wrote
(in article
<1120153187.779372.187600@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>):

>
>
> Martin Ambuhl wrote:
>> 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.
>
> Is there any easy way to convert the data?

Define 'easy'.

You could just write it all out as ASCII text, using a known
format, then read it in and convert it based upon that format.

The short example you used only involved an int, so it's pretty
simple. What are you really trying to do?

Or you could use something like XML if you have managers around
that like buzzwords.

--
Randy Howard (2reply remove FOOBAR)

.



Relevant Pages

  • Formatting Numbers
    ... I'm importing data from an access database into an Excel spreadsheet. ... a column that contains numeric and alpha numeric data. ... format the numeric data so that it is in number format (currently it imports ... format of the alphanumeric data manually as there are only two or three ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Excel importing of csv and xml
    ... You can certainly automate the process - start by recording a macro ... XL imports according to the MS Spreadsheet schema. ... want to import numbers in a different format, ... > comes in as numeric data of 1503 in both formats, ...
    (microsoft.public.excel)
  • Re: MISSING ZERO IN IMPORTED EXCEL DATA 104.10 = 104.1 ????HOW CAN
    ... My VB App converts the numeric data into text because I need to ... >> When importing from Excel (or any other external file format, ... Wherever you want to show the two decimals (or ...
    (microsoft.public.access.externaldata)
  • Re: Concatenate numbers
    ... leading "0" when concatenating the numbers and what settings affect ... should be stored in numeric data types. ... Or using that format pattern with the column command: ... column digits format  0.999999999999999999 ...
    (comp.databases.oracle.misc)
  • RE: Formatting Numbers
    ... "Frank Kabel" wrote: ... >>a column that contains numeric and alpha numeric data. ... >>format the numeric data so that it is in number format ... >>happens until I edit an individual cell. ...
    (microsoft.public.excel.worksheet.functions)