❔ Output from a command line app has extra characters when redirected to my application
here is the redirected output. It has these weird characters that are underlined. When running the command line application by itself these characters are not there. Why do i get these characters when i redirect the output?
6 Replies
these are the ansi escape codes, i guess when u run it by itself the output is colored?
@cap5lut its just white text
oh right, i mislooked. anyway these are still ansi escape codes, the very first seem to be erase line and keep cursor position, followed by moving the curser by 0 column positions (as its the very first output u wont see a difference in the console, but its still there in the stream
so either check if there is some way to configure the process to not use the ansi escape codes, or filter them out manually (maybe there is a lib for that? dunno)
oh alright. Thanks for the help
This may happen if you do something other than just writing text. For example: moving cursor or changing foreground/background color
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.