title: Caesar Cipher in Java (Spanish Characters)
body: <p>I've reading <a href="https://stackoverflow.com/questions/1821545/simple-caesar-cipher-in-java/">this question</a>, and I was wondering if Is there any way to consider the whole range of characters? For example, "á", "é", "ö", "ñ", and not consider " " (the [Space])? (For example, my String is "Hello World", and the standard result is "Khoor#Zruog"; I want to erase that "#", so the result would be "KhoorZruog")</p>
  
  <p>I'm sure my answer is in this piece of code:</p>
  
  <pre><code>if (c &gt;= 32 &amp;&amp; c &lt;= 127)
          {
              // Change base to make life easier, and use an
              // int explicitly to avoid worrying... cast later
              int x = c - 32;
              x = (x + shift) % 96;
              chars[i] = (char) (x + 32);
          }
  </code></pre>
  
  <p>But I've tried some things, and it didn't work.</p>