[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] parsing text from a file



At 02.52 -0400 1999.04.28, Peter Prymmer wrote:
>Matthew Langford wrote:
>
>> Isn't this essentially just a MacPerl behavior?  For years, few
>> distinguished between octal codes for \n and \r, on any platform including
>> Macs, until a certain innocent design decision to remap these in MacPerl.
>
>No this is not just MacPerl, Mac C compilers (including Metrowerks and
>things from Apple such as MrC) take "\n" -> \015.  The iostream in C++
>takes "cout << endl;" -> \015 on the Mac.  Java has a special method for
>you to ask it what EOL it would use on the current plaform.

Slight correction: Metrowerks compilers by default do CRLF -> \r\n, but
allow you to select the other method that Apple's and some others use (CRLF
-> \n\r).  So it all depends on which C compilers you are using, and even
under many of those you can opt to switch them around.

--
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org