Android webview不显示'%'字符(Android webview not displaying '%' character)
我有一个使用以下代码的WebView :
WebView webView = new WebView(cont); webView.loadData("Red 20%", "text/html", "utf-8");显示字符串时遇到问题。 但是如果我从字符串中删除'%'字符就会正确显示。 代码有什么问题? 如何在WebView显示'%'?
I have a WebView using following code:
WebView webView = new WebView(cont); webView.loadData("Red 20%", "text/html", "utf-8");It is having trouble showing the string. But if I remove the '%' character from the string it is showing properly. What is wrong with the code? How do I display '%' in WebView?
最满意答案
简单:
WebView webView = new WebView(cont); webView.loadData("Red 20%", "text/html", "utf-8");您可以在此处查看特殊字符: http : //www.degraeve.com/reference/specialcharacters.php
Simple:
WebView webView = new WebView(cont); webView.loadData("Red 20%", "text/html", "utf-8");You can see the special characters here: http://www.degraeve.com/reference/specialcharacters.php
更多推荐
发布评论