| Thread overview | |||||
|---|---|---|---|---|---|
|
March 15, 2016 Dpaste modifies applocation output ? | ||||
|---|---|---|---|---|
| ||||
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 Re: Dpaste modifies applocation output ? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Temtaime | 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 Re: Dpaste modifies applocation output ? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Temtaime | 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.
| |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply