Escape codes are not 100% portable

Jens Bauer via Digitalmars-d digitalmars-d at puremagic.com
Thu Apr 2 06:12:13 PDT 2015


On Thursday, 2 April 2015 at 11:55:09 UTC, ketmar wrote:
> so your suggestion actually *introduces* the bug in DMD.

Nope, not if implemented correctly.
0x0a should be handled, 0x0d should be handled and 0x0d0a should 
be handled.

But if using \r and \n, then you would have problems with 0x0d0a 
files, because you would expect 0x0a followed by 0x0d; on such 
platforms. This is an incorrect sequence.

Flles received from a DOS or DOS-like system would then have 
incorrect line numbers reported.


More information about the Digitalmars-d mailing list