[Gambas-user] removing xterm escape codes from terminal text

Bruce Steers bsteers4 at gmail.com
Tue Jun 7 22:19:26 CEST 2022


Has anyone made a routine to strip xterm escape codes from a terminal text?

I'm looking at having to have a close study of the
TerminalFilter_VT100.class and try to account for all possible code
combinations to strip them.

I thought before i spent hours doing it i'd ask if anyone already has and
could share the code.

Or if there is already a way either an existing function somewhere or
possibly in gb.form.terminal or some other class a function that could do
it.

I'm looking at TerminalFilter_VT100.class and the function OutputTo() looks
like it could do it , it seems to do all the right processing but for other
reasons. maybe by printing to a stream i could get plain text but i do not
know how to do that :(

Any thoughts/suggestions?
Many thanks
All the best
BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220607/fbae4334/attachment.htm>


More information about the User mailing list