You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Me...@ibsplc.com on 2002/10/30 13:22:58 UTC

Problem with unicode

Hi,
     Suppose a field in the database has unicode values such as
ش.

when i use html:text or textarea or for that matter any html
components (using struts tag), i get the correct character.
However if i use the
<bean:write .../> tag
in the output i get the following characters.

&amp;#1588; as a result of which instead of the expected character i
get &#1588; in the page.
How is it possible to escape the "&amp;" that is coming instead of "
&".

Do i have to use any response filters to filter out any of the "amp"'s
. It works fine for a simple jsp without the <bean> tag
using the old scriplet method.

Merrill

Disclaimer:
"The information in this e-mail is intended only for the person or
entity to which it is addressed and may contain confidential and/or
privileged material. It should not be used by anyone who is not the
original intended recipient. If you have erroneously received this
message, please delete it immediately and notify the sender. The
recipient acknowledges that IBS or IBS Group like any other large
global corporation, are unable to exercise total control or ensure or
guarantee the integrity of contents of the information contained in
individual e-mail transmissions and the recipient acknowledges that
any views expressed in this message may be those of the individual
sender and no binding nature of the message shall be implied or
assumed unless the sender does so expressly with due authority of IBS
Group. Before opening any attachments please check them for viruses
and defects."


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Problem with unicode

Posted by Xavier Combelle <xc...@kaptech.com>.
I think you should use the attribute filter="false" of the write tag
which will disable the character filtering by struts.

see the following adress for more detailed explaination
http://jakarta.apache.org/struts/userGuide/struts-bean.html#write


Xavier

> -----Message d'origine-----
> De : MerrilG@ibsplc.com [mailto:MerrilG@ibsplc.com]
> Envoye : mercredi 30 octobre 2002 13:23
> A : struts-user@jakarta.apache.org
> Objet : Problem with unicode
> 
> 
> Hi,
>      Suppose a field in the database has unicode values such as
> &#1588;.
> 
> when i use html:text or textarea or for that matter any html
> components (using struts tag), i get the correct character.
> However if i use the
> <bean:write .../> tag
> in the output i get the following characters.
> 
> &amp;#1588; as a result of which instead of the expected character i
> get &#1588; in the page.
> How is it possible to escape the "&amp;" that is coming instead of "
> &".
> 
> Do i have to use any response filters to filter out any of the "amp"'s
> . It works fine for a simple jsp without the <bean> tag
> using the old scriplet method.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>