i would suggest starting at request (that way only your request is affected) widen scope when you want the same encoding for all other webapps http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/ServletRequest.html#setCharacterEncoding(java.lang.String)
some background on UTF-8 vs UTF-16 available at: http://download-west.oracle.com/otn_hosted_doc/jdeveloper/904preview/uixhelp/uixdevguide/international.html you probably want to think on whether to include multibyte charsets such as mandarin (in which case you'll want to accomodate UTF-16) you're safe with european languages implementing UTF-8 encoding hth Martin ______________________________________________ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > Subject: Re: request.setCharacterEncoding() && request.getParameter() > From: email_danie...@yahoo.com.br > To: users@tomcat.apache.org > Date: Wed, 8 Jul 2009 19:22:57 -0300 > > Hi, Chris. The only missing item in my checklist ("What can you > recommend to just make everything work?") is the first one (Set > URIEncoding="UTF-8" on your <Connector> in server.xml). > I didn't know that "Most web browsers today do not specify the > character set of a request". Well, better later than never. > > Thanks ! > > > On Wed, 2009-07-08 at 17:41 -0400, Christopher Schultz wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > Daniel, > > > > On 7/8/2009 9:41 AM, Daniel Henrique Alves Lima wrote: > > > Today i've found a bug on our application: Except for a multipart/form, > > > all non-English characters (like á and ç) sent in HttpServletRequest was > > > messed up. > > > > Sorry for the terse reply, but this page has lots of good information: > > > > http://wiki.apache.org/tomcat/FAQ/CharacterEncoding > > > > - -chris > > -----BEGIN PGP SIGNATURE----- > > Version: GnuPG v1.4.9 (MingW32) > > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > > > iEYEARECAAYFAkpVEpsACgkQ9CaO5/Lv0PDkrQCdH8jEeEnS/DhtBD63uGYPdZVG > > 2GsAnixe13l8V7KIg4kxCMUTnRXtW6zC > > =b9R6 > > -----END PGP SIGNATURE----- > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > > For additional commands, e-mail: users-h...@tomcat.apache.org > > > -- > "If there must be trouble, let it be in my day, > that my child may have peace." > > Thomas Paine > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > _________________________________________________________________ Insert movie times and more without leaving Hotmail®. http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd_062009