I have a text file that is processed by a third party. They told me the file is invalid because it contains a non-printable character. What's the best way to find the non-printable character as my normal text editors won't display it. I would prefer a windows, dos, or powershell based solution.
Go to View Menu > Select Show Symbol > Select Show All Characters . It displays all hidden characters in the opened file.
To show non-printing characters in Word, click the “Home” tab in the Ribbon. Then click the “Show/Hide Non-Printing Characters” button in the “Paragraph” button group. The face of the button looks like the paragraph mark (“¶”).
To identify the Non Unicode characters we can use either Google Chrome or Mozilla firefox browser by just dragging and dropping the file to the browser. Chrome will show us only the row and column number of the .
You can download Notepad++ and open the file there. Then, go to the menu and select View->Show Symbol->Show All Characters
. All characters will become visible, but you will have to scroll through the whole file to see which character needs to be removed.
Unfortunately, Notepad++ will automatically convert line endings according to your Edit->EOL Conversion
selection, so it won't help if your non-printable characters are CR or LF.
Alternatively, you could install the TextFX plugin from SourceForge, and use TextFX->TextFX Characters->Zap all non-printable characters to #
. This will replace some non-printable characters with a pound sign, but not CR or LF.
Lastly, you could use Notepad++, and use Encoding->Convert to UTF8 without BOM
. This will remove non-printable characters which occasionally causes issues with certain renderers (VSO).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With