I'm loading data in webview from my web server.
In some webpages, it contains Bangali (Bangla) Font
. In most of the devices, everything is working fine.
But some of Samsung
devices the font is not showing correctly.
Galaxy S Duos3
Galaxy S Duos3 (vivalto3gvn)
Galaxy S2 (GT-I9100)
Galaxy Young2
Galaxy Core (arubaslim)
(Sony)
Xperia acro S (LT26w)
Xperia Z2 (D6503)
are some of them. The actual content should be like
but the devices are showing like this
My code is:
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setDefaultTextEncodingName("utf-8");
webView.getSettings().setPluginState(WebSettings.PluginState.ON);
webView.setLayerType(View.LAYER_TYPE_HARDWARE, null);
webView.loadDataWithBaseURL(null, url, "text/html", "UTF-8", null);
I've checked the answers Android WebView with garbled UTF-8 characters., String Encoding problem in Webview and the blog post
can't figure out my problem.