character encoding - How can I save Perl/Expect output that contains mixed ascii content? -
character encoding - How can I save Perl/Expect output that contains mixed ascii content? -
i have perl script uses expect library login remote system. i'm getting final output of interaction before method:
$exp->before(); i'm saving text file. when utilize cat on file outputs fine in terminal, when open text file in editor or seek process formatting bizarre:
[h[2j[1;19hcirculation activity terminal (nov 6,14)[11;1h
is there improve way save output?
when run enca it's identified as:
7bit ascii characters
surrounded by/intermixed non-text data
you can remove none ascii chars.
$str1 =~ s/[^[:ascii:]]//g; print "$str1\n"; perl character-encoding expect text-processing
Comments
Post a Comment