tillias tillias - 1 year ago 143
Java Question

JSF 2 Copyright symbol

I have following outputText:

<h:outputText escape="false" value="#{bean.copyrightText}"/>

This copyrightText is loaded from properties file (bean is Spring Bean):

server.copyrightText=&copy; &#169; 2016 some text goes here

Unfortunately copyright symbol is not redered correctly. Instead following string is rendered (IE, Chrome, Firefox):

&copy; &#169; 2016 some text goes here

When I add this symbol directly in Java then copyright symbol is rendered correctly:

res.append("\u00a9 ");

What can be the rootcause of this problem?

Answer Source

You can use unicode characters in spring resource bundle´s. This should work:

server.copyrightText=\u00a9 2016 some text goes here