276

In Notepad++ I have set "replace tab with 2 spaces".

When coding in Python I copy-pasted some code from the web and it appeared indented correctly. But running the code resulted in indentation errors, which I solved in the end by removing all "visible" spaces at line beginnings and inserting the same amount of spaces again.

Could it be possible that Scintilla based Notepad++ does not show all special characters, but displays them as spaces? Is there a setting to fix this?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
user89021
  • 14,784
  • 16
  • 53
  • 65

7 Answers7

430

Yes, it does. The way to enable this depends on your version of Notepad++. On newer versions you can use:

Menu ViewShow Symbol → *Show All Characters`

or

Menu ViewShow SymbolShow White Space and TAB

(Thanks to bers' comment and bkaid's answers below for these updated locations.)


On older versions you can look for:

Menu ViewShow all characters

or

Menu ViewShow White Space and TAB

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Steve Willcock
  • 26,111
  • 4
  • 43
  • 40
  • 15
    It depends on the encoding, I don't believe it will show you all the whitespace symbols, for example if you try no-break space U+00A0 or zero-width no-break space U+FEFF – ClearBlueSky85 May 04 '16 at 22:51
  • 1
    What about some char like \u0000 , how to display it – JaskeyLam Jul 24 '17 at 09:21
  • 4
    Note: NP++ isn't perfect: I'm using some tools to generate files and I somehow have a char that doesn't show, but the arrow keys take two presses to skip over it. :( – Jester Jan 27 '18 at 15:08
  • N.B. NP++ doesn't show BOM characters, though it does have the facility to add / remove them by changing the encoding of the file. – Spikeh Jul 27 '18 at 09:34
  • 1
    I can't see ‎ characters anyway. – Uri May 16 '20 at 16:49
  • 1
    @Uri me too, cannot see rlm, lrm, lre, rle, pdf and other bidi control characters – iman May 27 '20 at 13:18
  • 2
    N++ does NOT show all characters, even with this option enabled. See: https://stackoverflow.com/a/71603418/1077650 – 4wk_ Aug 18 '22 at 16:00
105

In newer versions of Notepad++ (currently 5.9), this option is under:

View->Show Symbol->Show All Characters

or

View->Show Symbol->Show White Space and Tab
bkaid
  • 51,465
  • 22
  • 112
  • 128
  • In one of my file which i am trying to identify the special characters in the hidden empty space, Notepad++ is showing as NUL. What would be that actual symbol? – goofyui Oct 25 '18 at 15:56
  • @goofyui - I know it's been a long time, but probably this one: https://www.compart.com/en/unicode/U+2400 (See the entire block here: https://www.compart.com/en/unicode/block/U+2400) – Mike Christiansen Oct 17 '22 at 21:16
17

Double check your text with the Hex Editor Plug-in. In your case there may have been some control characters which have crept into your text. Usually you'll look at the white-space, and it will say 32 32 32 32, or for Unicode 32 00 32 00 32 00 32 00. You may find the problem this way, providing there isn't masses of code.

Download the Hex Plugin from here; http://sourceforge.net/projects/npp-plugins/files/Hex%20Editor/

wonea
  • 4,783
  • 17
  • 86
  • 139
7

No, it does not. At least not natively without plugins.

Yes, N++ does show almost all non printable char, but not all of them, even with the option "Show all characters" toggled on.

For instance, U+200B or U+FEFF or U+A0 are not displayed, even when toggling ON "Show all char".


Let's take this sample, from an online tool: An online tool that DOES display all char


Here is what it looks like in N++:

Notepadd++ does NOT display all char


NB: Notepad++ does "see" those characters, because if you move your cursor with the arrow keys, it will not move for one more keystroke after each dot on line 3. But it doesn't display them, even with "Display all characters" options.

Disclaimer: This question was about spaces, but the title is more broad, and this is the first result on SERPs when searching about "displaying all chars on N++".

TylerH
  • 20,799
  • 66
  • 75
  • 101
4wk_
  • 2,458
  • 3
  • 34
  • 46
2

For non-printing characters, you can do the following:

  • if you could identify the character, where cursor takes 2 arrow keys to move, just select that character.
  • do Ctrl-F
  • now you can count or replace or even mark all such characters
Yuankun
  • 6,875
  • 3
  • 32
  • 34
MPD
  • 21
  • 3
1

Yes, and unfortunately you cannot turn them off, or any other special characters. The options under \View\Show Symbols only turns on or off things like tabs, spaces, EOL, etc. So if you want to read some obscure coding with text in it - you actually need to look elsewhere. I also looked at changing the coding, ASCII is not listed, and that would not make the mess invisible anyway.

0

In Notepad++ v8.4.8 (and probably earlier versions) a plugin needs to be used. Using the Converter plugin's (v4.5 author Do Ho) ASCII to HEX converter (Plugins -> Converter -> ASCII to HEX) can reveal such characters and worked for me

Deepak
  • 3,648
  • 1
  • 22
  • 17