Fix Android WebView with garbled UTF-8 characters

taken from the last line of https://stackoverflow.com/a/10831462/728287
This commit is contained in:
Gianfrancø Palumbo 2018-10-09 12:14:28 +03:00 committed by GitHub
parent 336cdc8559
commit 513886775c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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