Thursday, January 24, 2008

Java: reading / writing international characters

It is actually very easy to support international characters in java. The only trick is knowing the charset that the text is encoded in. Most of the time is a safe bet to try UTF-8 if you dont know. If you use Apache's HTTPClient it has methods to get the charset of the stream you are reading from.


  1. Thanks! This code was just what I needed in order to read and write æ, ø & å! :-)

  2. Hi!

    How can I read international characters from console?

    Thanks, Tibor

  3. @Tibor: stackoverflow is where you should be asking questions like this, not a random blog.

    Ive gone ahead and asked your question there: