in Uncategorized

Reading windows-1253 in Java

Believe it or not, there are (still) sites out there with the windows-1253 encoding.

As wikipedia and common sense declaires:
It is not fully compatible with ISO 8859-7 (Ά is located differently). UTF-8 is preferred for modern applications.

So, if you ever have to read windows-1253 in one of your applications do it this way:

buffReader = new BufferedReader(new InputStreamReader(inputStreamR, Charset.forName("windows-1253")));
Share