What did Notepad++ interpret to result in an "ESC" character?
-
I am analysing a bootlog-file that is produced by an industrial PC.
When opened in Notepad++ it is littered with “ESC” characters (with black background).
In Windows Notepad and MSWord these position have a little rectangle/square.I would like to know what Notepad++ interpreted to be shown as “ESC”.
So I’m not (yet) trying to get rid of them but I’m trying to understand their origin.Can anyone help me with that?
-
@pwgeers ,
That
ESC
in the black box indicates the ASCII Control Character “Escape (ESC)”. This means that the bytes of the file have the byte at codepoint 27 (aka\x1B
or\0033
or^[
depending on your favorite nomenclature for control codes).If the bootlog file were to use ANSI Escape sequences to add coloring or change position (which were used in the DOS days with ANSI.sys and in all the Unix/Linux terminals starting with VT100), then it would make sense to have lots of ESC characters, because all of the Escape sequences start with the ESC character.
We had a conversation about ANSI escapes literally a few days ago. It’s funny how certain topics aren’t discussed for years, and then multiple independent sources suddenly start talking about it at nearly the same time. :-)
-
@peterjones
Thanks Peter, I roughly read through the linked post, and it would make sense that it is coloured tekst, when looking at the live logging I see some green or red tekst passing.
I’ll dive into the details of the related post tomorrow, thanks for the help. -
@peterjones
Yep, now that I understand the syntax of the Esc-sequence it was easy for me to remove them using the replace function of Notepad++. The ESC was shown as square in the Replace-dialog but worked fine.To me it was not important to see the formatting just the content (and I wanted to be sure that I did not remove content), luckily there were just 2 or 3 variants of Escape sequences used.
And yeah it’s funny how that sometimes related topics become active at the same time.