Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter out escape sequence 'character set' select #92

Merged
merged 1 commit into from
Sep 20, 2017

Conversation

pmhahn
Copy link

@pmhahn pmhahn commented Aug 10, 2017

Some terminals (xterm) supports two different 'character sets' ('G0' and
'G1'), which can be switched with 'SI' (shift in, '\017') and 'SO'
(shift out, '\016'). Each character set can be configured separately
and can be chosen from a list of pre-defined sets like 'ASCII Set' and
'Special Graphics'.

Running TERM=xterm tput sgr0 to reset the terminal returns an escape
sequence starting with 'ESC ( 0', which selects the 'ASCII Set' for
'G0'. This currently is not understood by the Jenkins AnsiColor plugin.

Filter out those sequences, as they otherwise clutter the output.

https://www.in-ulm.de/~mascheck/various/alternate_charset/ has a nice
description for characters sets

This is issue #29, a
upstream port of https://issues.jenkins-ci.org/browse/JENKINS-24387

This fixes #29

Some terminals (xterm) supports two different 'character sets' ('G0' and
'G1'), which can be switched with 'SI' (shift in, '\017') and 'SO'
(shift out, '\016'). Each character set can be configured separately
and can be chosen from a list of pre-defined sets like 'ASCII Set' and
'Special Graphics'.

Running `TERM=xterm tput sgr0` to reset the terminal returns an escape
sequence starting with 'ESC ( 0', which selects the 'ASCII Set' for
'G0'. This currently is not understood by the Jenkins AnsiColor plugin.

Filter out those sequences, as they otherwise clutter the output.

<https://www.in-ulm.de/~mascheck/various/alternate_charset/> has a nice
description for characters sets

This is issue <fusesource#29>, a
upstream port of <https://issues.jenkins-ci.org/browse/JENKINS-24387>
@gnodet gnodet merged commit 3ce6987 into fusesource:master Sep 20, 2017
@pmhahn pmhahn deleted the parse-sgr0 branch September 21, 2017 07:22
hboutemy added a commit that referenced this pull request Dec 2, 2017
reported #92 fix after #95 PrintStream copy of OutputStream
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AnsiOutputStream does not filter all of tput sgr0
2 participants