Thread overview
Dpaste modifies applocation output ?
Mar 15, 2016
Temtaime
Mar 15, 2016
ag0aep6g
Mar 15, 2016
John Colvin
March 15, 2016
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.
March 15, 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.
March 15, 2016
On Tuesday, 15 March 2016 at 11:48:48 UTC, 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.

dpaste has problems with escape codes and also with non-ascii characters. It's been this way for a while, don't know why.