HI! I have a web page content in encoded in ISO-8859-2. How to convert a stream encoded in this charset to java's UTF-8. I'm trying the code below, but it does not work. It messes up some characters. Is there some other way to do this?
BufferedInputStream inp = new BufferedInputStream(in);
byte[] buffer = new byte[8192];
int len1 = 0;
try{
while ( (len1 = inp.read(buffer)) != -1 )
{
String buff = new String(buffer,0,len1,"ISO-8859-2");
stranica.append(buff);
}