Wait, isn't 0x9B perfectly valid as part of a normal UTF-8 character? You would have to know whether the terminal which will display the log output (which could be on a different machine running a different operating system on the other side of the world) is in UTF-8 mode (in which case CSI is 0xC2 0x9B, and other sequences containing 0x9B should not be filtered out), or in ISO-8859-1 mode (in which case 0x9B should always be filtered out), or in some other mode (I have no idea how other multibyte encodings represent CSI).