[Bioperl-l] Root::IO handle Mac and Win32 LF
Aaron J. Mackey
amackey at pcbi.upenn.edu
Tue Dec 16 07:53:15 EST 2003
I meant that when I examine a text file created by a Mac application
(in this case, Endnote) using the unix tool "od -c" I see only "\r".
I agree it's all very confusing; I apologize if I've only added to the
uproar.
-Aaron
On Dec 16, 2003, at 7:04 AM, Dave Howorth wrote:
> Aaron J. Mackey wrote:
>>> I.e Windows terminates lines with \r\n but a Mac perversely reads
>>> them as \n\r.
>> Actually, it seems that there are some Mac-derived files with only
>> \r, and no \n at all (as a recent example, EndNote 6 exported
>> bibliographies have no \n's, only \r's by od -c's reckoning).
>
> Now you've confused me again. What do you mean by \r? Are you saying
> there are some Mac files with only \012 or with only \015? That is
> are you speaking as a Unix/Linux/Windows user or as a Mac user?
>
> This is why it's better not to use \r and \n at all in this context.
>
>>> I think for portable code it's better to write the regexps using the
>>> octal values: \015 instead of CR and \012 instead of LF.
>> We don't have issues writing files, only reading one-line-at-a-time
>> and canonicalizing it (why do we need to canonicalize it again,
>> Jason?)
>
> I wasn't talking about writing files, I was talking about writing the
> regexps that are used for reading files. (But as the section I quoted
> from Perldoc points out, there *are* issues with writing files if you
> want to use them with some network protocols :)
>
> Cheers, Dave
> --
> Dave Howorth
> MRC Centre for Protein Engineering
> Hills Road, Cambridge, CB2 2QH
> 01223 252960
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
>
More information about the Bioperl-l
mailing list