瀏覽代碼

Merge pull request #71 from gianpaj/patch-1

Fix Android WebView when using UTF-8 characters (garbled output)
Thibault Malbranche 6 年之前
父節點
當前提交
d3747b6623
No account linked to committer's email address
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. 1
    1
      android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java

+ 1
- 1
android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java 查看文件

@@ -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
       }