Использование webView.loadData(String data, String mimeType, String encoding)
на Android для отображения html-контента внутри webView
не будет правильно отображать китайские символы. Использование loadDataWithBaseURL(String baseUrl, String data, String mimeType, String encoding, String historyUrl)
с нулевыми значениями для "baseUrl"
и "historyUrl"
решит проблему. Есть ли для такого поведения?
webView.loadData: Does not display the Chinese characters correctly
webView.loadDataWithBaseURL: Displays the Chinese characters correctly`
webView.loadData("html content containing Chinese characters", "text/html", "UTF-8"); //does not work
webView.loadDataWithBaseURL(null, "html content containing Chinese characters", "text/html", "UTF-8", null); //works