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

Benoit Minisini benoit.minisini at gambas-basic.org
Wed Jun 8 00:23:08 CEST 2022

Le 07/06/2022 à 22:19, Bruce Steers a écrit :
> 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

Why do you want to do that?

Benoît Minisini.

More information about the User mailing list