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

Re: [MacPerl-Modules] Re: [MacPerl-Porters] Need authoritative Apple refs for EOL == CR



On Mon, 1 Mar 1999, Paul J. Schinder wrote:

> On Mon, Mar 01, 1999 at 04:05:05PM -0400, Arved Sandstrom wrote:
> } That thing about TeachText is pretty conclusive. I think Chris Nandor was
> } sort of alluding to the same thing.
> 
> Whoa.  Now, I'm confused.  What is it exactly that you are asking?
> That MacOS uses \015 as end-of-line is easily demonstrated.  That
> MacPerl uses \n == \015 is also easily demonstrated, and that it
> *should be* that way takes only a little thought.  That \n is always
> \015 in every Mac application that uses C-like escapes is simply
> wrong.  Alpha is a counter example; they use \r == \015.
> 
> So what is it that you are trying to prove?  That MacOS uses \015 as
> end of line, that MacPerl uses \n == \015, or that \n == \015 is a
> general MacOS convention?  I've never seen any Official Documentation
> (TM) that says that MacOS end of line is \015, but anyone with a Mac
> and MacPerl can easily demonstrate that it is by looking at any of the
> README's that come with Apple software.  Why anyone would want to
> argue with you about that is beyond me.

The discussion over on Perl-XML has, I think, gotten to a crux. There is
general agreement that in a Perl script (including module tests) which
uses Perl XML modules, that returned XML _must_ contain \012 characters
for the line-ends.

Up to this point most (not all) of the XML module authors and users have
been able to get away with a lot - they've been returning XML and
comparing it directly to original content, because this works on Unix. I
just finished building XML::Parser-2.20 - there was one test failure there
due to the fact that '.' was being used in a RE to identify XML line-ends.
Again, only on Unix.

There will be some serious revision of tests aand scripts and what have
you in order to make them portable, which by Perl's def'n of \n these
folks will have to do. I anticipate that they will want some solid
evidence, like Chris and David located, that the MacOS line-end is indeed
\015, before they change their mindset.

There was also some murmuring that the XML spec is flawed in this regard.
It seemed to me that Larry Wall took a position with respect to this that
is quite supportive of MacOS, and some Windows guys were helping out, too.
It was quite indicative of how things are at the moment that Tim Bray, who
figures prominently in XML spec development, clearly believed that XML
lineends were being crunched to '\n' on all OS's. So to promote some
education here I'd also like to have good refs handy.

I propose not to ever mention Alpha, or BBEdit, or Codewarrior, etc, in
this thread over on Perl-XML. It muddies the waters, I think. These are
sophisticated text editors that accept any line-ends. If I mention them,
it's just ammo for the other side that wants to say, "Well, if those apps
can handle it, why can't they all?"

Hope that clarifies matters. Arved



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