Hi, i'm trying to display a page in UTF-8 encoding (japanese) using a WebView via a direct URL and loadUrl has proven not effective given it seems it doesn't support UTF-8 encoded urls.
My code is atm the following and the problem is the source is retrieved but nothing at all is displayed. Did i miss something, the code is working for http://www.google.com but i still have encoding problems on iso-8859-1 aswell (replacing all the UTF-8 by ISO-8859-1) Thanks a lot HttpClient httpclient = new DefaultHttpClient(); HttpGet httpget = new HttpGet("http://ja.wikipedia.org/wiki/刀"); httpget.setHeader("Content-Type","text/html; charset=UTF-8"); HttpResponse response; BufferedReader real_response = null; try { response = httpclient.execute(httpget); new InputStreamReader( response.getEntity().getContent(), "UTF-8")); } catch (Exceptionn e) { e.printStackTrace(); } if (real_response != null) { String data = ""; String tempdata = ""; try { while ((tempdata = real_response.readLine()) != null) { data += tempdata; } } catch (Exception e) { e.printStackTrace(); } wv.loadDataWithBaseURL("http://www.lliane.com/", data, "text/html", "UTF-8", "about:blank"); } --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---