delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/25/18:18:16

Message-ID: <3401CC3F.3C1A@cs.com>
Date: Mon, 25 Aug 1997 18:17:35 +0000
From: "John M. Aldrich" <fighteer AT cs DOT com>
Reply-To: fighteer AT cs DOT com
Organization: Two pounds of chaos and a pinch of salt
MIME-Version: 1.0
To: Cesar Scarpini Rabak <csrabak AT dce03 DOT ipt DOT br>
CC: djgpp AT delorie DOT com
Subject: Re: Writing a struct to disk
References: <1 DOT 5 DOT 4 DOT 32 DOT 19970825173441 DOT 006ab780 AT dce03 DOT ipt DOT br>

Cesar Scarpini Rabak wrote:
> 
> Text format is not _that_ highly portable! When one switches from
> environment the way the end of line is marked varies, and filters or
> converting programms may be needed...

True.  However, a great many programs that I have seen are capable of
recognizing EOLs, whatever their format.  For example, DOS Edit can load
and parse Unix-formatted text files.  I guess they're just designed with
that in mind.

> And since C language does not require a standard character set (as e.g. Ada
> which requires ASCII), one may even to use translators for the character set
> as well!

C may not require one, but characters 32-127 of the ASCII character set
are pretty well fixed on most systems.  I suppose that machines using
that IBM format, EDB-whatsit, could cause confusion, but anybody who
uses such systems should be aware of the discrepancy.

But your concerns are valid, which brings up another point:  is there
such a thing as a universal format for data exchange?  GNU seems to
think so; at least, all of their files are in text format and they have
very few problems.

-- 
---------------------------------------------------------------------
|      John M. Aldrich       | "Democracy is based on the assumption|
|       aka Fighteer I       | that a million men are wiser than one|
|   mailto:fighteer AT cs DOT com   | man.  How's that again?  I missed    |
| http://www.cs.com/fighteer | something."    - Lazarus Long        |
---------------------------------------------------------------------

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019