Render ANSI high intensity text without bold, and ANSI high intensity background as either that, or blink

+1 vote
asked Apr 11, 2012 by ender (260 points)
edited Nov 5, 2012

Rebex currently doesn't seem to have an option to not render the high-intensity (e[1m) sequence as just that, without also making the font bold. It also handles the blink/high intensity background sequence (e[5m) quite differently from other terminals - it makes the text bright instead of background (which is what I'd actually like \e[1m to do).

Compare the output of the following bash one-liner in rebex and other terminals:

for b in seq 40 47; do for c in seq 30 37; do echo -e "\033[0;$c;$b""m $c;$b \033[1m $c;$b;1 \033[0m033[0;$c;$b;5m $c;$b;5 \033[1m $c;$b;5;1 \033[0m"; done; done

P.S.: why does this form insert > Blockquote whenever I press \ (which is AltGr+Q on my keyboard)?

commented Apr 12, 2012 by Lukas Matyska (59,010 points)
edited Apr 12, 2012

We are not able to reproduce the "AltGr+Q" issue. Can you please provide us: Keyboard layout, OS version and language, Browser version you use?

3 Answers

+1 vote
answered Apr 12, 2012 by Lukas Matyska (59,010 points)
edited Nov 5, 2012
Best answer

The two sequences are a little bit problematic. We found these definitions:

\e[1m: Bold or increased intensity. It is driven by terminal.Options.SelectGraphicRendition1.

\e[5m: Slowly blinking (less then 150 per minute). It is driven by terminal.Options.BlinkingText.

\e[6m: Rapidly blinking (150 per minute or more). It is driven by terminal.Options.BlinkingText.

We are going to add an option to decide behavior for these sequences. I will post a sample code when it is released. If you want beta version, please let us know.

UPDATE: Since version 2012 R3, you can change the behavior of \e[1m like this:

terminal.Options.SelectGraphicRendition1 = SelectGraphicRendition1.LightColor

Default of the \e[5m and \e[6m sequences is:

terminal.Options.BlinkingText = BlinkingText.LightBackColor
commented Apr 13, 2012 by Stefan Koell (270 points)
edited Apr 13, 2012

Hey Lukas, if you have a beta with those enhancements, I'm interested to implement and test it for you.

cheers, Stefan

0 votes
answered Apr 12, 2012 by ender (260 points)
edited Apr 13, 2012

I like the way PuTTY handles e[1m: it gives you an option to use either bold, or bright (though not both at once).

e[5m is usually handled as bright background - this is probably due to historical reasons - in PC character mode, setting the background color to values 8 to 15 would either make the foreground blink while using low-intensity background (this was the default), or it would set the background color to high-intensity (for which you had to do a BIOS call first IIRC). Most terminal emulators use this second meaning (xterm is the only one I know that actually makes the text blink, but IMHO that's annoying - I didn't like blinking text even in DOS days).

As for e[6m, I don't know if anything actually uses this (quick check shows that PuTTY treats it as e[5m [high-intensity background], and xterm ignores it, so it's unlikely I'd notice).

The AltGr+Q issue might actually be a bug in Opera 12 alpha - I just checked with some other browsers (including Opera 11.62), and it indeed doesn't happen there (my keyboard layout it Slovenian).

commented Apr 13, 2012 by Lukas Matyska (59,010 points)
edited Apr 13, 2012

Thank you for detailed explanation. Also we decided to change the default behavior of the mentioned sequences to be handled same way as PuTTY and xterm do.

0 votes
answered Apr 13, 2012 by ender (260 points)
edited Apr 13, 2012


BTW, I just noticed that all \backslashes in my posts are gone (I'm pretty sure I saw them after posting - backslash is AltGr+Q in Slovenian keyboard layout).

commented Apr 13, 2012 by Martin Vobr (12,950 points)
edited Apr 13, 2012

This is because backslash is an escape character in the MarkDown syntax used by this Q/A engine. It's same as in string literals in C# - you have to use double backslashes '\\'. Sorry for inconvenience. I've updated your question and added double backslashes where needed.