开发者

Richfaces calendar "ü" (&#252) character problem

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,


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 add escape="false" attribute to the output component.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜