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

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
chrisjj
Posts: 149
Joined: Sat Jan 21, 2006 10:32 pm

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

Post 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?
User avatar
AmigoJack
Posts: 515
Joined: Sun Oct 30, 2016 4:28 pm
Location: グリーン ヒル ゾーン
Contact:

Post 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.
chrisjj
Posts: 149
Joined: Sat Jan 21, 2006 10:32 pm

Post 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.
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post 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.
Post Reply