title: How do I recognize a character such as "ç" as a letter?
body: <p>I have an array of bytes that contains a sentence. I need to convert the lowercase letters on this sentence into uppercase letters. Here is the function that I did:</p>
  
  <pre><code> public void CharUpperBuffAJava(byte[] word) {
       for (int i = 0; i &lt; word.length; i++) {
          if (!Character.isUpperCase(word[i]) &amp;&amp; Character.isLetter(word[i])) {
              word[i] -= 32;
          }
       }
      return cchLength;
   }
  </code></pre>
  
  <p>It will work fine with sentences like: "a glass of water". The problem is it must work with all ANSI characters, which includes "ç,á,é,í,ó,ú" and so on. The method Character.isLetter doesn't work with these letters and, therefore, they are not converted into uppercase.</p>
  
  <p>Do you know how can I identify these ANSI characters as a letter in Java?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>If someone wants to know, I did method again after the answers and now it looks like this:</p>
  
  <pre><code>public static int CharUpperBuffAJava(byte[] lpsz, int cchLength) {
      String value;
      try {
          value = new String(lpsz, 0, cchLength, "Windows-1252");
          String upperCase = value.toUpperCase();
          byte[] bytes = upperCase.getBytes();
          for (int i = 0; i &lt; cchLength; i++) {
              lpsz[i] = bytes[i];
          }
          return cchLength;
      } catch (UnsupportedEncodingException e) {
          return 0;
      }
  }
  </code></pre>