Dpaste modifies applocation output ?

ag0aep6g via Digitalmars-d digitalmars-d at puremagic.com
Tue Mar 15 05:31:51 PDT 2016


On 15.03.2016 12:48, Temtaime wrote:
> Hi!
>
> http://dpaste.dzfl.pl/93d518c713b5
>
> On dpaste it's ["a\n\nb"]
> But should be ["a\r\n\rb"]
>
> I've tested with dmd on win, linux and mac : all is ok, and only dpaste
> returns incorrect result.
>
> Why so?
> I'd wrote them using contact form but seems no reply.

Looks like they have a mechanism that replaces "\\r\\n" (literally 
backslash, 'r', backslash, 'n') and lone occurrences of "\\r" and "\\n" 
with a single \n newline character.

I have no idea why they would do that. It's obviously nonsense. It also 
breaks stuff like this:

   writeln("\\n");
   writeln(`\n`);

The mechanism does not seem to mess with other equivalent escape 
sequences, like \x0D and \x0A, or \u000D and \u000A.


More information about the Digitalmars-d mailing list