comp.lang.ada
 help / color / mirror / Atom feed
* gnat 2011 - macbook
@ 2012-05-25 10:13 RasikaSrinivasan@gmail.com
  2012-06-11 19:44 ` Blady
  0 siblings, 1 reply; 3+ messages in thread
From: RasikaSrinivasan@gmail.com @ 2012-05-25 10:13 UTC (permalink / raw)


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






^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: gnat 2011 - macbook
  2012-05-25 10:13 gnat 2011 - macbook RasikaSrinivasan@gmail.com
@ 2012-06-11 19:44 ` Blady
  2012-06-11 20:02   ` Blady
  0 siblings, 1 reply; 3+ messages in thread
From: Blady @ 2012-06-11 19:44 UTC (permalink / raw)


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.




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: gnat 2011 - macbook
  2012-06-11 19:44 ` Blady
@ 2012-06-11 20:02   ` Blady
  0 siblings, 0 replies; 3+ messages in thread
From: Blady @ 2012-06-11 20:02 UTC (permalink / raw)


Le lundi 11 juin 2012 21:44:27 UTC+2, Blady a écrit :
> 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.

With Internet URL should be better:
http://blady.pagesperso-orange.fr/alpha.html
And for French readers:
http://blady.pagesperso-orange.fr/creations.html#ada-text-io
Regards, Pascal.




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-06-14 16:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-25 10:13 gnat 2011 - macbook RasikaSrinivasan@gmail.com
2012-06-11 19:44 ` Blady
2012-06-11 20:02   ` Blady

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