【发布时间】:2012-03-08 17:31:57
【问题描述】:
当我在网络浏览器中显示项目符号、版权符号、商标标志时,它们 看起来不错。
// bullets: http://losangeles.craigslist.org/wst/acc/2900906683.html
// bullets: http://losangeles.craigslist.org/lac/acc/2902059059.html
// bullets: http://indianapolis.craigslist.org/acc/2867115357.html
// bullets: http://indianapolis.craigslist.org/ofc/2885697780.html
// bullets: http://indianapolis.craigslist.org/ofc/2887554512.html
// copyright: http://chicago.craigslist.org/nwc/acc/2854640931.html
但是当我使用 Android WebView 时,我得到“三角形内的问号”:
web.loadDataWithBaseURL(null, myHtml, null, "UTF-8", null);
我应该使用不同的编码吗?
我是否应该自己搜索/替换某些字符... 1×1?
【问题讨论】:
-
UTF-8 很好,如果您使用的是 android 4.0,我遇到了 loadDataWithBaseURL 问题,请尝试使用 loadData
-
loadData() 更糟。它甚至无法正确显示一些引号和撇号。
-
我不能要求 OS 4.0。它仅在世界上极少数的设备上使用。我正在针对 v4.0.3 进行编译,但只需要 v2.2。不过,同样的问题。
标签: android encoding character-encoding webview html-escape-characters