Cucumber — ANSI formatting
When cucumber output is piped to file on disk, it may contain non-printable characters and markup, for example:
[32m6 passed steps[0m
Actually looks like this when output to console:
6 passed steps
This is due to cucumber emitting Ansi formatting.
Most of these escape sequences start with the characters ESC (ASCII decimal 27/hex 0x1B/octal 033) and [ (left bracket). This sequence is called CSI for Control Sequence Introducer(or Control Sequence Initiator). There is a single-character CSI (155/0x9B/0233) as well.
The ESC+[ two-character sequence is more often used than the single-character alternative, for details see C0 and C1 control codes. Devices supporting only ASCII (7-bits), or which implement 8-bit code pages which use the 0x80–0x9F control character range for other purposes will recognize only the two-character sequence. Though some encodings use multiple bytes per character, in this topic all characters are single-byte…
This formatting can be suppressed using the: