Richfaces 日历““xFC” (ü) 性格问题
我正在使用 Richfaces 3.3.3 和 rich:calendar 渲染“ü”而不是月份名称的“ü”。我的浏览器的编码是UTF-8,我尝试了所有主要浏览器的问题。他们都渲染了“ü”。我的区域设置是“TR”,代表土耳其语。如果我总结一下,“九月”在土耳其语中被翻译为“Eyl”&# 252;“l”。
请不要介意“ü”处的空格。我在这篇文章中添加了它,如果我不添加空格,此表单将呈现“ü”:)
您对这个问题有想法吗?
多谢,
I'm using Richfaces 3.3.3 and rich:calendar renders " 252;" instead of "ü" for month names. My explorer's encoding is UTF-8 and i tried the issue for all major explorers. They all rendered " 252;". My locale setting is "TR" which is for Turkish. If i summerize, "September" is rendered "Eyl" 252;"l" for Turkish.
Please don't mind the space at " 252;". I added it for this post, if i don't add a space this form renders "ü" :)
Do you have an idea for this problem?
Thanks a lot,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这与区域设置无关,而是与 HTML 转义有关。它已被 HTML 转义,但它不应该被转义。如果您在网络浏览器中研究 HTML 源代码(右键单击,查看源代码),那么您很可能会看到它在其中显示为
ü
它在 HTML 中有效地显示为ü
。目前尚不清楚这些月份名称值的来源以及它们如何呈现。如果它们源自 RichFaces 本身并由 RichFaces 本身渲染,那么您就无能为力。这可能是 RichFaces 中的一个错误。您必须亲自向 他们的主页 的 JBoss 人员报告。
但是,如果您可以控制这些值,并且它们存储为 Java 属性文件和/或由 Java 代码读入字符串,那么您应该将
ü
替换为\u00fd< /code> 这是 Unicode 字符 'LATIN SMALL LETTER U AND 的 Java 编码分音符'。或者,如果您可以控制输出/渲染值,那么您应该向输出组件添加
escape="false"
属性。This is not related to the locale, but to HTML escaping. It is been HTML-escaped while it should not be. If you investigate the HTML source in webbrowser (rightclick, View Source), then there's a big chance that you see that it appears as
ü
in there which get effectively displayed asü
in HTML.It's unclear where those month name values originate and how they are rendered. If they originate in RichFaces itself and are rendered by RichFaces itself, then you can't do any much. It's likely a bug in RichFaces. You've got to report it yourself to the JBoss guys at their homepage.
But if you have control over those values and they are stored as Java properties files and/or read into a string by Java code, then you should replace
ü
by\u00fd
which is the Java encoding of Unicode Character 'LATIN SMALL LETTER U WITH DIAERESIS'. Or if you have control over outputting/rendering the values, then you should addescape="false"
attribute to the output component.