RE: How to get UTF-8 decoded parameters from request - Chinese Characters

2007-01-30 Thread PATTUS, Jean-Philippe
Hi the list,
finally i have found what is the problem.
I've had a filter in order to set the character encoding 
on the request ( request.setCharacterEncoding(UTF-8);).
But this filter was not called in first in the filter list defined in the
web.xml.
If the parameters have been read before request.setCharacterEncoding(UTF-8); 
the encoding is lost.
What i've done, is to put in first the filter in the web.xml.
Now all works fine.

Thank you for your help (and sorry for my poor english).


-Message d'origine-
De : Christopher Schultz [mailto:[EMAIL PROTECTED]
Envoyé : mardi 23 janvier 2007 17:38
À : Tomcat Users List
Objet : Re: How to get UTF-8 decoded parameters from request - Chinese
Characters


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jean-Philippe,

PATTUS, Jean-Philippe wrote:
 When i fill my form with chinese characters and i submit() the form,
 on the server side when i read the parameter from my request i get
 C:/ç›é€‰ç¨‹åº something like this.

Where do you see this kind of thing?

 On the jsp page when i display the query string
 (document.location.search) i get the correct chinese characters.
 How could i set the encoding parameter to Tomcat ? I have tried to
 add URIEncoding=UTF-8 in my server.xml but it doesn't work.

If the characters re-display correctly in your page after a submit, then
I would say that everything is working correctly.

If you are seeing those funny characters in a log file, then I would
suggest that maybe the tool you are using for viewing your logfile (tail
on UNIX, notepad, whatever) might not understand UTF-8 and/or your
logfile itself is not declared to contain UTF-8 characters.

It might just be a problem with viewing your logs, and it's really
working behind the confusion.

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFtjoA9CaO5/Lv0PARAp3eAJ92/JdBxyAPi1+gfx5GtFKGBZh8dwCfcafo
SxS951/JigMt0XnvLBdii3U=
=cbo6
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


**
Ce message et ses pi�ces jointes sont confidentiels et �tablis a l'intention 
exclusive de ses destinataires.
Tout message �lectronique est susceptible d'alt�ration. SOGITEC d�cline toute 
responsabilit� au titre de ce message s'il a �t� alt�r�, d�form� ou falsifi�.
Si vous n'�tes pas destinataire de ce message, merci de le d�truire 
imm�diatement.
**


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to get UTF-8 decoded parameters from request - Chinese Characters

2007-01-23 Thread PATTUS, Jean-Philippe
Hello the list, i'm back with my chinese langage.
In a jsp file i have a form input type=text id=id button 
onclick=submit()/button/form

When i fill my form with chinese characters and i submit() the form,  on the 
server side when i read the parameter from my request i get  C:/ç›é€‰ç¨‹åº 
something like this.
On the jsp page when i display the query string (document.location.search) i 
get the correct chinese characters.
How could i set the encoding parameter to Tomcat ? I have tried to add 
URIEncoding=UTF-8
in my server.xml but it doesn't work.

If you have some ideas ?
   
 


 Jean-Philippe Pattus 
  Sogitec Industries
  Division Documentation et Systèmes
  E-mail : [EMAIL PROTECTED]
  Tél. : 02.99.05.34.25   Fax : 02.99.05.34.05
   Out of office on wednesday's and friday's afternoons  
 
 
 

**
Ce message et ses pièces jointes sont confidentiels et établis a l'intention 
exclusive de ses destinataires.
Tout message électronique est susceptible d'altération. SOGITEC décline toute 
responsabilité au titre de ce message s'il a été altéré, déformé ou falsifié.
Si vous n'êtes pas destinataire de ce message, merci de le détruire 
immédiatement.
**



Re: How to get UTF-8 decoded parameters from request - Chinese Characters

2007-01-23 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jean-Philippe,

PATTUS, Jean-Philippe wrote:
 When i fill my form with chinese characters and i submit() the form,
 on the server side when i read the parameter from my request i get
 C:/ç›é€‰ç¨‹åº something like this.

Where do you see this kind of thing?

 On the jsp page when i display the query string
 (document.location.search) i get the correct chinese characters.
 How could i set the encoding parameter to Tomcat ? I have tried to
 add URIEncoding=UTF-8 in my server.xml but it doesn't work.

If the characters re-display correctly in your page after a submit, then
I would say that everything is working correctly.

If you are seeing those funny characters in a log file, then I would
suggest that maybe the tool you are using for viewing your logfile (tail
on UNIX, notepad, whatever) might not understand UTF-8 and/or your
logfile itself is not declared to contain UTF-8 characters.

It might just be a problem with viewing your logs, and it's really
working behind the confusion.

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFtjoA9CaO5/Lv0PARAp3eAJ92/JdBxyAPi1+gfx5GtFKGBZh8dwCfcafo
SxS951/JigMt0XnvLBdii3U=
=cbo6
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]