You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jacopo <in...@j-d.it> on 2007/02/22 15:22:44 UTC
Re: [S2] Struts encoding problem ?
I solved the problem with this method:
public static String euroAdjust(String value)
{
if (value != null)
{
value = value.replaceAll("\u0080","\u20AC");
}
return value;
}
the param of the request is parsed with euroAdjust() and the right € euro
symbol is sent to db and saved.
When I read the € euro symbol from the db I have to convert like an HTML
entity.
If you use taglib <bean:message> it doesn't work.
I modified the taglib in struts.jar:
org.apache.struts.util.ResponseUtils.java
public static String filter(String value) {
...
// add this lines to get euro HTML entity
case'\u0080':
filtered = "€";
break;
case'\u20AC':
filtered = "€";
break;
...
}
--
View this message in context: http://www.nabble.com/Struts-encoding-problem---tf2104457.html#a9100705
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org