[android-developers] Re: Has anyone succeeded in displaying non latin-1 characters in Webview after RC33?
you may use: loadDataWithBaseURL (null, content, "text/html", "utf-8", "about:blank"); On Feb 13, 2:33 pm, Mark Murphy wrote: > Chister Nordvik wrote: > > String xml = "" + > > "" + > > "Norwegian chars: åø" + > > "" + > > ""; > > myWebView.loadData(xml, "text/html", "UTF-8"); > > > This code works for latin-1 but as far as I know there are not HTML > > entities defined for Latin-2 so I was wondering if there are other > > solutions to displaying non latin-1 in aWebview? I've tried encoding > > the string given to loadData as UTF-8 but with little success... > > The string provided to loadData() is loaded via a data: URL and so needs > to be URL-encoded, apparently. > > -- > Mark Murphy (a Commons Guy)http://commonsware.com > _The Busy Coder's Guide to Android Development_ Version 2.0 Published! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: Has anyone succeeded in displaying non latin-1 characters in Webview after RC33?
Thanks! That did the trick :-) Seems like they changed the behavior in RC33, but now it works perfectly again. -Christer --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: Has anyone succeeded in displaying non latin-1 characters in Webview after RC33?
Apparently the problem was not documentation, but my lack of understanding of the data: scheme. My bad, Michael On Feb 14, 10:08 am, "Fred Grott(shareme)" wrote: > Kolby, Someone just updated javadocs for webview and etc in > source..its in code review.. > > I found a lot of more answers ot webview question i had..hold on link > is > > http://review.source.android.com/Gerrit#patch,sidebyside,8267,1,core/... > > On Feb 14, 7:55 am, kolby wrote: > > > Mark, > > > thanks for the tip on the URI encoding of the data for loadData. It > > worked like a charm. Apparently, I'm not the only one with this > > problem though. API documentation would go along way. > > > Michael --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: Has anyone succeeded in displaying non latin-1 characters in Webview after RC33?
Kolby, Someone just updated javadocs for webview and etc in source..its in code review.. I found a lot of more answers ot webview question i had..hold on link is http://review.source.android.com/Gerrit#patch,sidebyside,8267,1,core/java/android/webkit/WebView.java On Feb 14, 7:55 am, kolby wrote: > Mark, > > thanks for the tip on the URI encoding of the data for loadData. It > worked like a charm. Apparently, I'm not the only one with this > problem though. API documentation would go along way. > > Michael --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: Has anyone succeeded in displaying non latin-1 characters in Webview after RC33?
Mark, thanks for the tip on the URI encoding of the data for loadData. It worked like a charm. Apparently, I'm not the only one with this problem though. API documentation would go along way. Michael --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[android-developers] Re: Has anyone succeeded in displaying non latin-1 characters in Webview after RC33?
Chister Nordvik wrote: > String xml = "" + > "" + > "Norwegian chars: åø" + > "" + > ""; > myWebView.loadData(xml, "text/html", "UTF-8"); > > This code works for latin-1 but as far as I know there are not HTML > entities defined for Latin-2 so I was wondering if there are other > solutions to displaying non latin-1 in a Webview? I've tried encoding > the string given to loadData as UTF-8 but with little success... The string provided to loadData() is loaded via a data: URL and so needs to be URL-encoded, apparently. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Published! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---