使用 Wicket 进行 Unicode/编码
在 Wicket 中,我尝试在网页中包含文本“frāctus m(女性 frācta,中性 frāctum)”,该网页只是从具有正确编码(UTF-8,从 Eclipse 保存)的静态文本文件中提取的。当在浏览器中渲染时,它显示“fräctus m(女性fräcta,中性fräctum)”。是否有修复渲染编码方式的问题?我将 添加到我的主“模板”页面(其他页面继承自该页面),但这没有帮助。
In Wicket, I am trying to include the text "frāctus m (feminine frācta, neuter frāctum)," in a webpage which is simply pulled from a static text file with the correct encoding (UTF-8, saved from Eclipse). When rendered in the browser, it displays "frÄ�ctus m (feminine frÄ�cta, neuter frÄ�ctum)." Is there a fix for how the rendering is encoded? I added <?xml version="1.0" encoding="UTF-8"?>
to my main "template" page (from which the others inherit) but this didn't help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该能够将所有
ā
(带有宏宏的拉丁小写字母 a)更改为ā
并且它们应该正确显示,显然 Wicket 仍在确定 < a href="https://issues.apache.org/jira/browse/WICKET-3578" rel="nofollow">如何处理字符编码。编辑
您可能还想看看http://wiki。 apache.org/tomcat/FAQ/CharacterEncoding 并确保服务器设置正确。
You should be able to change all of the
ā
(Latin small letter a with macron) toā
and they should display properly, apparently Wicket is still determining how to handle character encoding.EDIT
You might want to also take a look at http://wiki.apache.org/tomcat/FAQ/CharacterEncoding and ensure that the server is properly setup.