Good and simple way to find invisible and unwanted characters
<p>As a learning developers on Debian, I encountered a really annoying problem: invisible character (different from EOL, space, indent etc). Literally PITA who makes you lose sometimes hours of debugging because you didn't thinked of them first. Now it's start to become a reflex but honnestly it's really hard to find them, specially where you are a rookie as me.</p>

<p>When you are sure what the line is the problem, you can just re-write it, simple but stupid. But now I have a blank page on my localhost and I can't find the line in my .php doing that. </p>

<p>When you do HTML/CSS you just have to display the source code from your browser. But for PHP as it's server side I don't think there is a dummy but simple solution like that.</p>

<p>Using vim, I tried to found something about it, and I can use :set list to find some character like this:</p>

<blockquote>
  <p>set listchars=eol:¬,tab:>-,trail:·,extends:>,precedes:&lt;</p>
</blockquote>

<p>But it's not doing what I need, I saw some syntax to display some invisible characters, as this regex:</p>

<blockquote>
  <p>\x00-\x09\x0B\x0C\x0E-\x1F\x7F</p>
</blockquote>

<p>So, from that I can found some invisible characters, I still had to try it (how can I be sure there is invisible character to test it? How can I make some?). But is there an "official" or at least trustable and complete list of invisible characters? Debuging is annoying enough, I don't need to find the invisible man :-).</p>

<p>I tried to found something about vim, one of the most useful was probably this one: <a href="https://stackoverflow.com/questions/23103466/showing-all-invisible-characters-in-vim">Showing all invisible characters in vim</a></p>

<p>Well, being French and just learning I have some characters like: </p>

<blockquote>
  <p>éçà</p>
</blockquote>

<p>Which are detected by: </p>

<blockquote>
  <p>/[^ -~&lt;09>] or /[^ -~]</p>
</blockquote>

<p>Very annoying, as I comment a lot. And I can stop using these characters but it looks like a non-sense to me.</p>

<p>In this topic it's also said to try the latin1 encodage. Maybe it removes some possible invisible characters to be typed? Is it a good solution to find the encodage who fits me for programing? Able to use "éàç" and remove some of annoying char? It doesn't looks like a 100% perfect solution, just a part of it.</p>

<p>So, do you have an idea of a good way to hunt them and better, help me to don't type them accidentaly?</p>

<p>I really tried to find a perfect solution, but it seems to be so much way to do this and I'm a bit lost between that and my new programing knowledge.</p>

<p>Thanks for your help.</p>