Re: request.setCharacterEncoding() && request.getParameter()

2009-07-11 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, On 7/8/2009 12:14 PM, André Warnier wrote: > 2) find out the available "locales" on the Linux host where you run this > Tomcat. > "locale -a | more" > Pick one locale that has "utf8" in the name, note its name. > In the system script that start

RE: request.setCharacterEncoding() && request.getParameter()

2009-07-08 Thread Martin Gainty
lement 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.getP

Re: request.setCharacterEncoding() && request.getParameter()

2009-07-08 Thread André Warnier
Daniel Henrique Alves Lima wrote: Another question: Even when response's content type is not text (like pdf/odt/doc or image streams), should i set the response charset ? Does "application/pdf; charset=UTF-8" make sense ? No. It only makes sense for MIME types that start with "text/" (s

Re: request.setCharacterEncoding() && request.getParameter()

2009-07-08 Thread Daniel Henrique Alves Lima
Another question: Even when response's content type is not text (like pdf/odt/doc or image streams), should i set the response charset ? Does "application/pdf; charset=UTF-8" make sense ? On Wed, 2009-07-08 at 19:23 -0300, Daniel Henrique Alves Lima wrote: > Hi, Chris. The only miss

Re: request.setCharacterEncoding() && request.getParameter()

2009-07-08 Thread Daniel Henrique Alves Lima
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 in server.xml). I didn't know that "Most web browsers today do not specify the character set of a request". Well, better late

Re: request.setCharacterEncoding() && request.getParameter()

2009-07-08 Thread Christopher Schultz
-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 ters

Re: request.setCharacterEncoding() && request.getParameter()

2009-07-08 Thread André Warnier
Daniel Henrique Alves Lima wrote On Wed, 2009-07-08 at 18:14 +0200, André Warnier wrote: 6) In your application, you can decide to interpret this series of bytes, as a string in the UTF-8 encoding, and decode it as such into Unicode *characters*. Forget about any parameters to specify the ch

RE: request.setCharacterEncoding() && request.getParameter()

2009-07-08 Thread Daniel Henrique Alves Lima
On Wed, 2009-07-08 at 12:29 -0500, Caldarale, Charles R wrote: > > From: Pid [mailto:p...@pidster.com] > > Subject: Re: request.setCharacterEncoding() && request.getParameter() > > > > 11) Check any .java files are also encoded in UTF-8? > > Might need one

Re: request.setCharacterEncoding() && request.getParameter()

2009-07-08 Thread Daniel Henrique Alves Lima
Hi, everybody. Thanks for the answers ! Just to make myself clear: 1. Always to set request charset before doing anything else fixes the bug; 2. When the bug is "on", only input data (request) is wrong. Previously utf-8 encoded data is rendered right (response). At

RE: request.setCharacterEncoding() && request.getParameter()

2009-07-08 Thread Caldarale, Charles R
> From: André Warnier [mailto:a...@ice-sa.com] > Subject: Re: request.setCharacterEncoding() && request.getParameter() > > A short overview : Great how-to; any interest in adding it to the FAQ? http://wiki.apache.org/tomcat/FAQ/CharacterEncoding - Chuck THIS COMMU

RE: request.setCharacterEncoding() && request.getParameter()

2009-07-08 Thread Caldarale, Charles R
> From: Pid [mailto:p...@pidster.com] > Subject: Re: request.setCharacterEncoding() && request.getParameter() > > 11) Check any .java files are also encoded in UTF-8? > Might need one of the grandees to say whether that is meaningful. The encoding of the .java files shoul

Re: request.setCharacterEncoding() && request.getParameter()

2009-07-08 Thread Pid
On 8/7/09 17:14, André Warnier wrote: Daniel Henrique Alves Lima wrote: IE is the best :-) "Note: The accept-charset attribute does not work properly in Internet Explorer. If accept-charset='ISO-8859-1', IE will send data encoded as 'Windows-1252'." That is only one of the issues (browser inc

Re: request.setCharacterEncoding() && request.getParameter()

2009-07-08 Thread André Warnier
Daniel Henrique Alves Lima wrote: IE is the best :-) "Note: The accept-charset attribute does not work properly in Internet Explorer. If accept-charset='ISO-8859-1', IE will send data encoded as 'Windows-1252'." That is only one of the issues (browser inconsistencies). If you want to

Re: request.setCharacterEncoding() && request.getParameter()

2009-07-08 Thread Pid
On 8/7/09 16:11, Daniel Henrique Alves Lima wrote: On Wed, 2009-07-08 at 14:58 +0100, Pid wrote: Hi, P. Thanks for your answer. If you're using JSP have you also checked that you've got: <%@ page contentType="text/html; charset=utf-8" and not: <%@ page contentType="text/html; charse

Re: request.setCharacterEncoding() && request.getParameter()

2009-07-08 Thread Daniel Henrique Alves Lima
IE is the best :-) "Note: The accept-charset attribute does not work properly in Internet Explorer. If accept-charset='ISO-8859-1', IE will send data encoded as 'Windows-1252'." http://www.w3schools.com/TAGS/att_form_accept_charset.asp On Wed, 2009-07-08 at 12:11 -0300, Daniel

Re: request.setCharacterEncoding() && request.getParameter()

2009-07-08 Thread Daniel Henrique Alves Lima
On Wed, 2009-07-08 at 14:58 +0100, Pid wrote: Hi, P. Thanks for your answer. > > If you're using JSP have you also checked that you've got: > > <%@ page contentType="text/html; charset=utf-8" > > and not: > > <%@ page contentType="text/html; charset=iso-8859-1" The jsps in our applica

Re: request.setCharacterEncoding() && request.getParameter()

2009-07-08 Thread Pid
On 8/7/09 14:41, Daniel Henrique Alves Lima wrote: Hi, everybody. Sorry for my poor English and for my ignorance too. We've built an application where we used utf-8 as default encoding (it runs in an English Linux box - default Java encodings will be utf-8). A few days ago, i've