ReadLine and encoding of the extended ascii table
<p>Good day.</p>

<p>I have an ASCII file with Spanish words. They contain only characters between A and Z, plus Ñ, ASCII Code 165 (<a href="http://www.asciitable.com/" rel="nofollow">http://www.asciitable.com/</a>).
I get this file with this source code:</p>

<pre><code>InputStream is = ctx.getAssets().open(filenames[lang_code][w]);
InputStreamReader reader1 = new InputStreamReader(is, "UTF-8");
BufferedReader reader = new BufferedReader(reader1, 8000);

try {
    while ((line = reader.readLine()) != null) {
                 workOn(line);
                 // do a lot of things with line
            }
    reader.close();
    is.close();
} catch (IOException e) { e.printStackTrace(); }
</code></pre>

<p>What here I called workOn() is a function that should extract the characters codes from the strings and is something like that:</p>

<pre><code>    private static void workOn(String s) {      
    byte b;
    for (int w = 0; w &lt; s.length(); w++) {
        b = (byte)s.charAt(w);
                    // etc etc etc
            }
}   
</code></pre>

<p>Unfortunately what happens here is that I cannot identify b as an ASCII code when it represents the Ñ letter. The value of b is correct for any ascii letter, and returns -3 when dealing with Ñ, that, brought to signed, is 253, or the ASCII character ². Nothing similar to Ñ...</p>

<p>What happens here? How should I get this simple ASCII code?</p>

<p>What is getting me mad is that I cannot find a correct coding. Even, if I go and browse the UTF-8 table (<a href="http://www.utf8-chartable.de/" rel="nofollow">http://www.utf8-chartable.de/</a>) Ñ is 209dec and 253dec is ý, 165dec is ¥. Again, not event relatives to what I need.</p>

<p>So... help me please! :(</p>
