www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Dpaste modifies applocation output ?

reply Temtaime <temtaime gmail.com> writes:
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.
Mar 15 2016
next sibling parent ag0aep6g <anonymous example.com> writes:
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.
Mar 15 2016
prev sibling parent John Colvin <john.loughran.colvin gmail.com> writes:
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.
Mar 15 2016