Re: utf-8 encoding problem

2007-08-17 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Joe, Joseph S wrote: > Christopher Schultz wrote: > >> Setting the encoding of the response is sometimes necessary when the >> browser (stupidly, IMO) elects not to send the charset being used to the >> server. >> > It isn't the browser's fault, its

Re: utf-8 encoding problem

2007-08-17 Thread Joseph S
Christopher Schultz wrote: Setting the encoding of the response is sometimes necessary when the browser (stupidly, IMO) elects not to send the charset being used to the server. It isn't the browser's fault, its the spec's fault. See https://bugzilla.mozilla.org/show_bug.cgi?id=289060#c8 --

Re: utf-8 encoding problem

2007-08-17 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mark and Joe, Mark Thomas wrote: > Joseph Shraibman wrote: >> Mark Thomas wrote: >> >>>request.setCharacterEncoding("UTF-8"); >> >> Is this always safe? For responses I can (and do) check the >> accept-charset request [header], but I can't fi

Re: utf-8 encoding problem

2007-08-17 Thread Ronald Klop
Most browsers will encode the request the same as the page it came from. This is true for POST variables. I'm not sure about GET query variables. In the past I found some websites explaining this hidden feature, but don't have the time to search again. Ronald. On Thu Aug 16 20:25:18 CEST 2007

Re: utf-8 encoding problem

2007-08-16 Thread Mark Thomas
Joseph Shraibman wrote: > Mark Thomas wrote: > >>request.setCharacterEncoding("UTF-8"); > > Is this always safe? For responses I can (and do) check the > accept-charset request paramater, but I can't figure out how to tell > what the request encoding should be. It should be reasonable u

Re: utf-8 encoding problem

2007-08-16 Thread Mark Thomas
Joseph Shraibman wrote: > This is an old problem. See > https://bugzilla.mozilla.org/show_bug.cgi?id=18643 > https://bugzilla.mozilla.org/show_bug.cgi?id=7533 > > Firefox and MSIE use a magic _charset_ paramater, but I can't use it > because if I call request.getParamater("_charset_") I can't set

Re: utf-8 encoding problem

2007-08-16 Thread Joseph Shraibman
This is an old problem. See https://bugzilla.mozilla.org/show_bug.cgi?id=18643 https://bugzilla.mozilla.org/show_bug.cgi?id=7533 Firefox and MSIE use a magic _charset_ paramater, but I can't use it because if I call request.getParamater("_charset_") I can't set the encoding after that! Anyw

Re: utf-8 encoding problem

2007-08-16 Thread Joseph Shraibman
Mark Thomas wrote: request.setCharacterEncoding("UTF-8"); Is this always safe? For responses I can (and do) check the accept-charset request paramater, but I can't figure out how to tell what the request encoding should be. --

Re: utf-8 encoding problem

2007-08-16 Thread Mark Thomas
Try this then - this is my standard character encoding index.jsp test. <%@ page contentType="text/html; charset=UTF-8" %> Character encoding test page Data posted to this form was: <% request.setCharacterEncoding("UTF-8"); out.print(request.getParameter("

Re: utf-8 encoding problem

2007-08-15 Thread Joseph S
POST Mark Thomas wrote: Joseph S wrote: When I did that my content displayed correctly, but on form submission it got corrupted. POST or GET? Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-m

Re: utf-8 encoding problem

2007-08-15 Thread Mark Thomas
Joseph S wrote: > When I did that my content displayed correctly, but on form submission > it got corrupted. POST or GET? Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] Fo

Re: utf-8 encoding problem

2007-08-15 Thread Joseph Shraibman
Nathan Hook wrote: A few things... First, what type of apostrophe are you using? Are you using a typical ascii apostrophe (') or are you using the Microsoft slanted apostrophe that comes out of word documents (′)? It's ’ Here are two links that describe the problem: http://www.cs.tut.

RE: utf-8 encoding problem

2007-08-15 Thread Nathan Hook
terChain.doFilter(request, response); } } Finally, I would also set the meta header on the jsp page to be utf-8 just to be complete... Regards... Original Message Follows From: Joseph S <[EMAIL PROTECTED]> Reply-To: "Tomcat Users List" To: Tomcat Users List Subject

utf-8 encoding problem

2007-08-14 Thread Joseph S
My problem is this: One of my pages with an apostrophe was not displaying properly, so I added to my jsp: <%@ page contentType="text/html; charset=UTF-8"%> When I did that my content displayed correctly, but on form submission it got corrupted. You can view the problem here: http://b.tupa