0

When using Notepad++ to view text files that also contain some lower ASCII control characters (such as NUL, BEL, and ACK), it shows every lower ASCII character in brackets like this:

[NUL][BEL][ACK]

Is it possible to have it automatically replace lower (non-displayable) ASCII characters as blank spaces, or simply strip them out?

Update: What I'm after is to use Notepad++ as a tool to view the visible ASCII (or Unicode) characters any file. It's fast and can load files of almost any size. When I have a file of unknown contents, it's rather ideal. With it's extensive language formatting, if the file is of a recognizable language, it will format it perfectly. If it's plain text, it will show it perfectly. The challenge comes in when a file has plain text mixed with lower ASCII characters. The automatic conversion of all those characters to the [XYZ] format makes viewing the file very difficult. I'm looking for a way to avoid that automatic conversion so the files are easier to view.

4
  • 1
    Replace in the target file, or only when viewing?
    – Arjan
    Commented Feb 6, 2016 at 10:02
  • @Arjan Great question. Only when viewing, although I'm fine if it changes the target file as well. Commented Feb 6, 2016 at 11:22
  • 1
    I thought they were called control characters.
    – jiggunjer
    Commented Feb 6, 2016 at 12:07
  • @jiggunjer Yes, that is correct. People often call them control characters, low ASCII characters, non-displayable characters, non-printing characters, signaling characters, and other similar terms. Commented Feb 6, 2016 at 12:30

1 Answer 1

2

You can use the RegEx pattern:

[\x00-\x1F]+

To remove all low ASCII chars:

enter image description here

enter image description here

2
  • Thanks. That's very useful. Is there any sort of filter or language setting that will do that automatically? Commented Feb 6, 2016 at 11:23
  • @RockPaperLizard hmmm, not that springs to mind I'm afraid. Perhaps combining it with a macro and NppExec? Not at my machine to test at the moment though, sorry!
    – Jonno
    Commented Feb 6, 2016 at 11:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .