Browse Source

Merge pull request #71 from gianpaj/patch-1

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

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

506
           view.loadDataWithBaseURL(
506
           view.loadDataWithBaseURL(
507
               source.getString("baseUrl"), html, HTML_MIME_TYPE, HTML_ENCODING, null);
507
               source.getString("baseUrl"), html, HTML_MIME_TYPE, HTML_ENCODING, null);
508
         } else {
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
         return;
511
         return;
512
       }
512
       }