struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laurie Harper <>
Subject Re: Displaying £ sign with bean:message
Date Tue, 04 Jul 2006 18:52:13 GMT
Ross Gardler wrote:
> I'm sure this is just a character encoding problem, but am struggling 
> with the solution:
> my file contains:
> accounts.points.value=1 point is equivalent to £0.01
> I have a tile which contains:
> <bean:message key="accounts.points.value"/>
> The result is a double character for th '£' (indicating the properties 
> file is in unicode?)
> How do I render this symbol correctly?

Properties files must be encoded as ASCII; non-ASCII characters must be 
represented by Unicode escape sequences (\u####). Use the native2ascii 
utility that comes with the JDK to convert from whatever encoding you've 
saved the properties file in to ASCII.

Also make sure you have the character encoding declared correctly in the 
generated HTML (using the page directive, for example

   <%@ page contentType="text/html; charset=UTF-8"%>

if you're sending UTF-8).


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message