Thanks for your reply; it helped me to go further on...

Now, I know where the problem is: it's nothing with Hibernate or Postgres. In fact 
with the multipart form encoding, the characters are encoded with Unicode (or UTF-8?). 
For example my € symbol is represented by the 8364 code. With the default form 
encoding, it was represented by the 0128 code.

My problem now is to render correctly the € symbol when it is coded by 8364... I 
tried to put the <%@ page contentType="text/html; charset=UTF-8" %> directive, but it 
renders "€" instead of "€"... Is there another way to render the "€" symbol 
another way than using the html entity &#8364; ? Because I have the following problem: 
when my ActionForm is not validated, it returns to the input page automatically and 
struts populate the form fields. So when one of my fields contains the € symbol, it 
isn't rendered well... and I can't replace it with the &#8364; entity, am I right?

Any help would be appreciated!


Christophe VIGOUROUX
ECILIA - Ingénieur développement
Tel: 04.78.68.46.14
Fax: 04.37.43.69.01


-----Message d'origine-----
De : Dan Tran [mailto:[EMAIL PROTECTED]] 
Envoyé : vendredi 27 décembre 2002 18:31
À : Struts Users Mailing List
Objet : Re: Problem with € and multipart/form-data enctype

Have you try to set your jsp's content type to charset=utf-8??

The following references may help:

   - Struts upload example
   - http://www.anassina.com/struts/i18n/i18n.html

-D
----- Original Message -----
From: "Christophe Vigouroux" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Friday, December 27, 2002 8:11 AM
Subject: Problem with Ђ and multipart/form-data enctype


Hi,

I'm developing an application using struts and hibernate for data
persistence. I have some kind of problems with special characters like the
"€" one.
When I use a standard <html:form> (so using the default
application/x-www-form-urlencoded enctype), I have no problem : the €
character is well persisted and I can load and display correctly the data
from my database (postgresql with Unicode database).

But when it comes to use multipart/form-data enctype in order to send some
file along with some text, the € character seems not to be saved correctly
in the database (it doesn't display well at all after reloading the data).
I've tried to modify a working form (from application/x-www-form-urlencoded
to multipart/form-data enctype) and the € symbol is not well saved.

I'm quite confused because when I try to debug my application, the attribute
of my form bean containing the € symbol is right (it outputs in my logger as
a € symbol...). Whatever enctype is used the character seems to be right in
the form bean, but with multipart enctype it does not save right in the
database!! Anyone as an idea of what I'm experiencing ??

Christophe Vigouroux



--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to