how to disable strip Vt100 control chars

Posted by ray.hsu on 2014-06-04 02:06

i used windows expect to find some words. But the expect striped some VT100 control keys "esc[40m", that cause my script didn't work.

the output string should be "esc[40mAAAA .... "
but thru expect, i got "AAAA....."

i can't just find AAAA because there is another sam words"AAAA" will cause my script to make wrong decesion.

i ever used "set ::exp::winnt_stripvt100 0" to avoid windows expect strip the VT100 control chars, it still not works fine on "esc[40m".