comp.lang.ada
 help / color / mirror / Atom feed
From: Kilgallen@SpamCop.net (Larry Kilgallen)
Subject: RE: Latin_1 and portability
Date: 13 Dec 2003 07:09:46 -0600
Date: 2003-12-13T07:09:46-06:00	[thread overview]
Message-ID: <Iya3bA61z2Td@eisner.encompasserve.org> (raw)
In-Reply-To: mailman.110.1071282456.31149.comp.lang.ada@ada-france.org

In article <mailman.110.1071282456.31149.comp.lang.ada@ada-france.org>, "amado.alves" <amado.alves@netcabo.pt> writes:
> <<
> Are you saying that some implementations of TEXT_IO.GET_LINE do not
> handle OS terminals properly ?
> 
> I thought GET_LINE was the way around OS-dependencies in this area.
>>>
> =20
> I find this fascinating. You can have an X-conventioned text file in a Y =
> system, where X and Y are operating systems (with distinct end of line =
> conventions). If you compile your Ada program to the Y target, it will =
> not read the X file properly. Amongs other unwarranted effects. Thit is =
> why I adopt an 1-N conversion approach. Say 8-bit characters. I use =
> Latin_1.NEL for end of line in the main application (the "1" side), and =
> provide (simple) converters to/from the N conventions.

That depends on your transfer mechanism.  ISO-9660 includes an indicator
regarding which of the 4 major EOL indicators is used in a file, and the
OS can readily honor that.  I have been told that some TCP/IP implementations
do conversion on the fly.

Taking random bits from one operating system to another is bound to fail
when the operating systems expects a particular format (text file). This
is no an Ada problem.



  reply	other threads:[~2003-12-13 13:09 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-13  2:27 Latin_1 and portability amado.alves
2003-12-13 13:09 ` Larry Kilgallen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-12-13 15:24 amado.alves
2003-12-14  2:46 ` Björn Persson
2003-12-14  5:04   ` Jeff C,
2003-12-14  6:12     ` Nick Roberts
2003-12-13 13:35 amado.alves
2003-12-13 14:54 ` Björn Persson
2003-12-13 22:17   ` Larry Kilgallen
2003-12-14  1:55     ` Björn Persson
2003-12-13 22:21 ` Larry Kilgallen
2003-12-10 13:16 amado.alves
2003-12-10 12:15 Xavier Serrand
2003-12-10 13:45 ` Georg Bauhaus
2003-12-10 22:00   ` Xavier Serrand
2003-12-10 18:33 ` Jeffrey Carter
2003-12-10 21:34 ` Pascal Obry
2003-12-10 21:52   ` Ludovic Brenta
2003-12-11  3:40 ` Robert I. Eachus
2003-12-12 23:41   ` Larry Kilgallen
2003-12-13 14:48     ` Robert I. Eachus
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox