You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Paranoid_Fabio <pa...@yahoo.it> on 2008/03/05 10:16:38 UTC

apostrophe does not appear

Hello. I've a problem.
Apostrophe in resource files of my application does not appear.

example:

Property1=L'ID è sbagliato

is showed (using <text> tag in the jsp page) as : LID è sbagliato

I'm using ISO-8859-1 in Eclipse editor and I include this on top of every
jsp page:

<%@ page language="java" pageEncoding="ISO-8859-1"%>

what's wrong? 

Thank you


-- 
View this message in context: http://www.nabble.com/apostrophe-does-not-appear-tp15846030p15846030.html
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


Re: apostrophe does not appear

Posted by Antonio Petrelli <an...@gmail.com>.
2008/3/5, Paranoid_Fabio <pa...@yahoo.it>:
>
>
> Hello. I've a problem.
> Apostrophe in resource files of my application does not appear.
>
> example:
>
> Property1=L'ID è sbagliato
>
> is showed (using <text> tag in the jsp page) as : LID è sbagliato



If you are using Struts 2, then the reason is that Struts 2 uses (correct me
if I am wrong) MessageFormat to format messages from resource bundles.
In MessageFormat, the apostrophe is used to delimit literal strings:
http://java.sun.com/javase/6/docs/api/java/text/MessageFormat.html
So the solution is simply to double the number of your apostrophes :-)

Ciao
Antonio

Re: apostrophe does not appear

Posted by Paranoid_Fabio <pa...@yahoo.it>.
Solved! Thank you :)


Paranoid_Fabio wrote:
> 
> Hello. I've a problem.
> Apostrophe in resource files of my application does not appear.
> 
> example:
> 
> Property1=L'ID è sbagliato
> 
> is showed (using <text> tag in the jsp page) as : LID è sbagliato
> 
> I'm using ISO-8859-1 in Eclipse editor and I include this on top of every
> jsp page:
> 
> <%@ page language="java" pageEncoding="ISO-8859-1"%>
> 
> what's wrong? 
> 
> Thank you
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/apostrophe-does-not-appear-tp15846030p15846634.html
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