| [reply] |
Hi stevieb,
Just a bit of feedback. I have tried a number of things and combinations (such as using the :bin and chomp => false options, using the lines, slurp, slurp-rest and get functions or methods), etc., but to no avail. Even when requested to keep new lines, Perl 6 is apparently converting \r\n sequences to \n on reading a Windows file, so that "un-chomped" lines end with \x0A (or ASCII 10), whether they come from a Unix or a Windows file. There doesn't seem to be a possibility to distinguish between EOL conventions this way. Or, at least, I haven't found any.
Not a good news, and unfortunately not very helpful, but I thought I should let you know about my tests.
| [reply] [d/l] [select] |
It's very helpful Laurent_R, thanks! Combined with what raiph said in Re^3: Perl6: Capturing newline in a string that I've reviewed, I'm thinking this is a bug (or at least a function that's lacking... I can't see me being the only person who will want to identify which endings a file has, as perl6 takes off).
There should be a way to get this information, or else there's no way to ensure the proper line endings get replaced (by proper I mean the original ones) when the endings aren't that of the local platform.
I'm going to do a bit more testing and review. If I can't figure anything out, I'll open a ticket.
| [reply] |