Page 1 of 1

8.0.2 Workaround for Tool Output failure to act on \r?

Posted: Fri Nov 11, 2016 1:42 am
by chrisjj
At a CMD prompt, this PHP

echo "abc\rxyz";

shows

xyz

In Tool Output it shows

abc
xyz

i.e. ignores the \r.

This is messing up my /-\| activity monitor.

Anyone know a workaround?

Posted: Fri Nov 11, 2016 10:38 am
by AmigoJack
CMD is Windows, and Windows' linebreaks consist of \r\n. I'm sure Textpad has its own conventions when interpreting output, so don't rely on that.

Posted: Fri Nov 11, 2016 11:49 am
by chrisjj
AmigoJack wrote:I'm sure Textpad has its own conventions when interpreting output
I'm not. None are declared in the docs and changing from the interpretation of the host OS would be pretty dumb.

Tool Output should show the tool output, unchanged.

Posted: Fri Nov 11, 2016 12:53 pm
by ben_josephs
TextPad is not ignoring the carriage return, it's interpreting it as an old-style Mac line terminator.

The job of an editor is to display the characters currently in a (physical or logical) file and, possibly, to enable you to edit them. It is not a dynamic display device that displays the result of executing a sequence of display instructions.

If a carriage return were interpreted as an instruction to return to the beginning of the line you would not be able to see the characters that preceded the carriage return and TextPad would not be doing its job as an editor.