HTML 单元显示错误字符
我正在使用 HTMLUnit。我正在访问这些页面,但是特殊(马耳他语)字符显示错误。例如,ġuvni 显示为 ?uvni
HtmlPage page = submit_button.click();
System.out.println(page.asText());
我怀疑这是一个编码问题,尽管我没有找到任何 page.setPageEndoding
或类似的方法...以前有人遇到过这样的问题吗?
谢谢!
I'm using HTMLUnit. I am accessing the pages however special (Maltese) characters are being displayed wrongly. For example, ġuvni is displayed as ?uvni
HtmlPage page = submit_button.click();
System.out.println(page.asText());
I suspect it's an encoding problem, though I don't find any page.setPageEndoding
or some similar method... Has anyone had such a problem before?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将此元标记放入
中,确保您的页面采用 UTF-8:
Make sure your page is in UTF-8 by putting this meta tag in your
<head>
: