Quantcast
Channel: Cannot get URL content as UTF-8 - Stack Overflow
Browsing index pages (3 articles)

Cannot get URL content as UTF-8

i'm trying to read content from a URL but it does return strange symbols instead of "è", "à", etc.This is the code i'm using:public static String getPageContent(String _url) { URL url; InputStream is =...

View Article


Answer by uberwach for Cannot get URL content as UTF-8

I don't really know why this should not work, however the Java 7 way would be to use StandardCharsets.UTF_8 see http://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.htmlin the...

View Article


Answer by Michael-O for Cannot get URL content as UTF-8

Judging by your example. You do receive a multibyte UTF-8 byte stream but your text editor reads in as ISO-8859-1. Tell your editor to read bytes as UTF-8!

View Article
Browsing index pages (3 articles)


Latest Images