in reply to Re^2: No Control M
in thread No Control M
I don't use "\n" because on some encodings this is not the real "\012".
What encodings? The unicode mechanism for specifying \n is 0x000a 0 according to Unicode Standard Annex #13: Unicode Newline Guidelines. Sure, there is EBCDIC, but translating around the \r doesn't help fix newlines on EBCDIC.
Also, my regular expression solves some weird non-unix and non-mac files I've found, which have first the newline, then the carriage return.
I've never heard of a system that used \n\r. Do you know what generates those files?
0: 0x0a is the same as \n in standard unix land, the unicode equiv is just null prepended.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: No Control M
by ww (Archbishop) on Apr 08, 2005 at 21:08 UTC | |
Re^4: No Control M
by ambs (Pilgrim) on Apr 08, 2005 at 21:03 UTC | |
by cazz (Pilgrim) on Apr 08, 2005 at 21:10 UTC | |
by ambs (Pilgrim) on Apr 08, 2005 at 21:13 UTC |
In Section
Cool Uses for Perl