Re: RFC 69 (v1) Standardize input record separator (for
[email protected] (Chaim Frenkel) 09 Aug 2000 12:00:55 -0400
| Newsgroups | perl.perl6.language.io |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]> 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. [email protected] +1-718-236-0183