Sign in to follow this  
Followers 0
mimo78

String replace on stdoutread

3 posts in this topic

Is it possible to replace strings while reading stdoutread.

I have some chars that is replaced with boxes, because stdoutread can't find out what to do with them.

so is it possible to do a stringreplace or stringregreplace while or before passing to stdout ?


Best Regards Mimo

Share this post


Link to post
Share on other sites



Is it possible to replace strings while reading stdoutread.

I have some chars that is replaced with boxes, because stdoutread can't find out what to do with them.

so is it possible to do a stringreplace or stringregreplace while or before passing to stdout ?

Maybe use a peek (3rd parameter of StdOutRead) to see which character will be on the stdout next, and if it is some invalid character, read it out but to dev/null so to speak, and put your own character there where the stdout character would go.

Btw I dont know if this is what you mean, since you don't pass to stdout, but you read from stdout. You pass to stdin. Or am I not getting it?


Roses are FF0000, violets are 0000FF... All my base are belong to you.

Share this post


Link to post
Share on other sites

I have some chars that is replaced with boxes, because stdoutread can't find out what to do with them.

That is simply not true. The reason those characters are replaced with boxes because they are visually represented as such, not because they are. The variable you capture the stdoutread to is very capable of storing those characters that you see as boxes.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0