title: Javascript: Find special characters in string
body: <p>I have this code:</p>
  
  <pre><code>        var text = "ß042´ßzpüwhü90hu54/()=?*/()=?*";
          var symboles = "!§$%&amp;/()=?*&lt;;:-&lt;,.-#+|~}][{@€";
          var symbolsContained = "", found = false;
          for (var i = 0; i &lt; symboles.length; i++) {
              if (text.indexOf(symboles[i]) != -1) {
                  found = true;
                  symbolsContained += symboles[i];
              }
          }
          console.log(symbolsContained, symbolsContained.length);
  </code></pre>
  
  <p>Unfortunately it is not working properly:</p>
  
  <ul>
  <li>symboles[1] finds a character that is not in the list ("A" with a ":" above it)</li>
  <li>The "€" is not processed properly</li>
  </ul>
  
  <p>Using substr() doesn't fix this. I guess it is a subject of character encoding but this is still a mystery for me. Any hint how this can be fixed?</p>