Problem with accents

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with accents

agnesedalmonte

Hi, I have a problem using accents into an xforms.
In particular I have this structure:
-an instance and
-a java bean

<xforms:instance>
<rootelement>
<fieldA></fieldA>
${mybean.FieldB}
</rootelement>
</xforms:instance>

mybean.FielB corresponds to a get method of mybean that return a String like
this: <fieldB><fieldC>example</fieldC>....</fieldB>.
This String is the result of the marshal of a structure stored in an Oracle
database. In this operation I use jaxb that marshals the data into a
ByteArrayOutputStream (marshaller.marshal(Example, baos);
) and after I call baos.toString().

My problem is that it doesn't work with accents, if my String contains some
accents like "è , à..." they are write bad. If I print the String with the
Java console it's writed correctly, the same if I write the String in a simple
jsp.
If I set 'UTF-8' in the marshaller it's the same, it dosn't write accents
correctly.

How can I solve my problem?
Thank in advance.

--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Problem with accents

Alessandro  Vernet
Administrator
Agnese,

How do you get that value into the form? Are you using a JSP with
separate deployment? Do you have XML declaration with an encoding
specified in the JSP file?

Alex

On Wed, May 19, 2010 at 2:04 PM,  <[hidden email]> wrote:

>
> Hi, I have a problem using accents into an xforms.
> In particular I have this structure:
> -an instance and
> -a java bean
>
> <xforms:instance>
> <rootelement>
> <fieldA></fieldA>
> ${mybean.FieldB}
> </rootelement>
> </xforms:instance>
>
> mybean.FielB corresponds to a get method of mybean that return a String like
> this: <fieldB><fieldC>example</fieldC>....</fieldB>.
> This String is the result of the marshal of a structure stored in an Oracle
> database. In this operation I use jaxb that marshals the data into a
> ByteArrayOutputStream (marshaller.marshal(Example, baos);
> ) and after I call baos.toString().
>
> My problem is that it doesn't work with accents, if my String contains some
> accents like "è , à..." they are write bad. If I print the String with the
> Java console it's writed correctly, the same if I write the String in a simple
> jsp.
> If I set 'UTF-8' in the marshaller it's the same, it dosn't write accents
> correctly.
>
> How can I solve my problem?
> Thank in advance.
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet