Escape codes are not 100% portable
ketmar via Digitalmars-d
digitalmars-d at puremagic.com
Thu Apr 2 06:08:11 PDT 2015
On Thu, 02 Apr 2015 12:57:11 +0000, Jens Bauer wrote:
>> Which compilers?
>
> MrCpp, MrC, MPWC, MPWCpp and CodeWarrior.
>
> These compilers must respect the platform's definition of \n = newline
> and \r = carriage return.
> Because the platform defines newline = 13, then \n must have the value
> 13.
so that platform is not ASCII-compatible, and text files must be
converted between platform encoding and ASCII.
> As the hex values will not change
yet they will be invalid on that platform. it's not DMD duty to recode
files from one encoding to another.
> Also ... some compilers might expand \n to a two-byte value 0x0d0a
then they are broken beyond any repair, and should be either fixed or
avoided.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20150402/cf5567e9/attachment.sig>
More information about the Digitalmars-d
mailing list