develooper Front page | perl.perl6.language.io | Postings from August 2000

Re: RFC 69 (v1) Standardize input record separator (for

Thread Previous | Thread Next
From:
Chaim Frenkel
Date:
August 9, 2000 09:01
Subject:
Re: RFC 69 (v1) Standardize input record separator (for
Message ID:
m38zu61l1j.fsf@csamnycln01.nyc.csam.com
That wasn't what the original RFC was discussing. 

There was no mention of cross-platform line-ending support.

Because I can validly embed a "^M" into my unix text file and it
will be quite valid. Under the RFC proposal I will suddenly get
an unexpected line ending.

The problems of intuiting line-endings is an open issue. I don't want
perl getting in my way without being asked.

I suggested a while ago on p5p an improved binmode(), that might do
such magic among other things.

<chaim>

>>>>> "BL" == Bart Lateur <bart.lateur@skynet.be> writes:

BL> On 09 Aug 2000 10:34:27 -0400, Chaim Frenkel wrote:
>> Please explain in what way "\n" is not safe on all platforms?
>> 
>> On all platforms, the actual line seperators are translated (except
>> under binmode()) to "\n". 

BL> Try processing a Mac file on Unix, or vice versa. You'll soon see why.

BL> Your scheme only works with platform native files.

-- 
Chaim Frenkel					     Nonlinear Knowledge, Inc.
chaimf@pobox.com				               +1-718-236-0183

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About