Sfoglia il codice sorgente

Merge pull request #71 from gianpaj/patch-1

Fix Android WebView when using UTF-8 characters (garbled output)
Thibault Malbranche 6 anni fa
parent
commit
d3747b6623
No account linked to committer's email address

+ 1
- 1
android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java Vedi File

@@ -506,7 +506,7 @@ public class RNCWebViewManager extends SimpleViewManager<WebView> {
506 506
           view.loadDataWithBaseURL(
507 507
               source.getString("baseUrl"), html, HTML_MIME_TYPE, HTML_ENCODING, null);
508 508
         } else {
509
-          view.loadData(html, HTML_MIME_TYPE, HTML_ENCODING);
509
+          view.loadData(html, HTML_MIME_TYPE + "; charset=" + HTML_ENCODING, null);
510 510
         }
511 511
         return;
512 512
       }