Hello,
I made a java method that retrieves the source code of an HTML page for a given address. The problem is that it does not recover properly accents etc. Do you guys have any idea ?
URL loc = new URL(address);
URLConnection urlcon = loc.openConnection();
InputStream in = urlcon.getInputStream();
int c = in.read();
StringBuilder build = new StringBuilder();
while (c! = -1) {
build.append((char) c);
c = in.read();
}
toreturn = build.toString();
Bookmarks