comp.lang.ada
 help / color / mirror / Atom feed
From: Blady <p.p11@orange.fr>
Subject: Re: gnat 2011 - macbook
Date: Mon, 11 Jun 2012 12:44:27 -0700 (PDT)
Date: 2012-06-11T12:44:27-07:00	[thread overview]
Message-ID: <da4e4258-96d8-48c5-8b9f-839f44105339@googlegroups.com> (raw)
In-Reply-To: <16918417-25c8-4547-bba8-89c4cb70f1fe@l5g2000vbo.googlegroups.com>

Le vendredi 25 mai 2012 12:13:23 UTC+2, RasikaSr...@gmail.com a écrit :
> all
> 
> I have a program that reads a text file using text_io.get_line.
> 
> It would appear that on the mac, the line terminator  CR are not
> digested by the get_line. On windows it seems that the CR/LF is
> handled and are not returned to the application. The test data file I
> am using originated in a Windows system.
> 
> Is this an expected behavior?
> 
> thanks, srini

Hi, yes it's clearly a drawback to deal with many different text formats for line terminator and  accentuated letters.
It should be processed automatically without care about format like many text editors guess the good format.
In 2005, I modified GNAT Text_IO lib with awareness to Mac CR line terminators and MacRoman characters.
See /Users/blady/Documents/Synchro/Blady/alpha.html
But I don't really use it because I switched to UTF-8 for my source code with Mac OS X.
And for remaining old Mac files I use TextWrangler to convert them.
http://www.barebones.com/products/textwrangler/

HTH, Pascal.




  reply	other threads:[~2012-06-14 16:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-25 10:13 gnat 2011 - macbook RasikaSrinivasan@gmail.com
2012-06-11 19:44 ` Blady [this message]
2012-06-11 20:02   ` Blady
replies disabled

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