Re: Default character encoding for ServletRequest

2009-10-08 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Halm, On 10/8/2009 3:20 AM, Halm Reusser wrote: > Christopher Schultz wrote: > >> Give [accept-charset] a try and see what happens. > > Does neither work. But thanks. :( Does the client send a Content-Type header including a charset if you explici

Re: Default character encoding for ServletRequest

2009-10-08 Thread Halm Reusser
Christopher Schultz wrote: On that page is a POST form. When I evaluate the posted data, they are NOT utf-8 encoded. /Most/ clients will act the way you expect, yet, there is no requirement for them to do so. What client is this, by the way? Firefox 3.5.3, IE7, Safari 4.0.3 See the W3C doc

Re: Default character encoding for ServletRequest

2009-10-07 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Halm, On 10/7/2009 11:44 AM, Halm Reusser wrote: > Peter Crowther wrote: >> What are you trying to achieve? If we know more about the problem you're >> trying to solve, we may be able to suggest some different approaches. > > The client receives an

Re: Default character encoding for ServletRequest

2009-10-07 Thread Mark Thomas
Halm Reusser wrote: > Hi Markus, > > thanks for your hints. > > Markus Meyer wrote: >> It all depends on the client. IIRC if you set the charset in the >> content type header to utf-8, like this >> >> contentType="text/html; charset=utf-8" >> >> most browsers will then use utf-8 for HTTP GET and

Re: Default character encoding for ServletRequest

2009-10-07 Thread Halm Reusser
Hi Andre-John, Andre-John Mas wrote: I wan't do it within the application. I prefer to configure the app container or the app itself. I had asked for this too a while back, but I was told the RFC indicates ISO-8859-1, so the developers didn't want to allow you to change the default encoding

Re: Default character encoding for ServletRequest

2009-10-07 Thread Halm Reusser
Hi Markus, thanks for your hints. Markus Meyer wrote: It all depends on the client. IIRC if you set the charset in the content type header to utf-8, like this contentType="text/html; charset=utf-8" most browsers will then use utf-8 for HTTP GET and POST requests when responding to the given

Re: Default character encoding for ServletRequest

2009-10-07 Thread Halm Reusser
Hi Peter, Peter Crowther wrote: What are you trying to achieve? If we know more about the problem you're trying to solve, we may be able to suggest some different approaches. The client receives an HTML page with contentType="text/html; charset=utf-8" On that page is a POST form. When I eval

Re: Default character encoding for ServletRequest

2009-10-01 Thread Andre-John Mas
On 1-Oct-2009, at 07:22, Halm Reusser wrote: Pid wrote: How about? request.setCharacterEncoding("ENCODING"); I wan't do it within the application. I prefer to configure the app container or the app itself. I had asked for this too a while back, but I was told the RFC indicates ISO-8859

Re: Default character encoding for ServletRequest

2009-10-01 Thread Markus Meyer
It all depends on the client. IIRC if you set the charset in the content type header to utf-8, like this contentType="text/html; charset=utf-8" most browsers will then use utf-8 for HTTP GET and POST requests when responding to the given page. See this thread for some more information: http

Re: Default character encoding for ServletRequest

2009-10-01 Thread Peter Crowther
2009/10/1 Halm Reusser : > Is there a possibility to force the client to use a specific encoding? No. Consider the first request a client makes: it has to create and send a HTTP request with no prior knowledge of, or communication with, the server. So it has no way of asking the server what enco

Re: Default character encoding for ServletRequest

2009-10-01 Thread Halm Reusser
Pid wrote: How about? request.setCharacterEncoding("ENCODING"); I wan't do it within the application. I prefer to configure the app container or the app itself. Bearing in mind that you're not really changing what the client requests, or might expect you to be setting... Is there a poss

Re: Default character encoding for ServletRequest

2009-10-01 Thread Pid
On 01/10/2009 10:44, Halm Reusser wrote: Hi, Calling <%= request.getCharacterEncoding() %> in a jsp deployed in a Tomcat 6.0.20 container returns null. Is there any possibility to force a default CharacterEncoding for such requests? How about? request.setCharacterEncoding("ENCODING"); Bear

Re: Default character encoding for ServletRequest

2009-10-01 Thread André Warnier
Halm Reusser wrote: Hi, Calling <%= request.getCharacterEncoding() %> in a jsp deployed in a Tomcat 6.0.20 container returns null. Is there any possibility to force a default CharacterEncoding for such requests? Don't worry, there is already a default. The only problem is to figure out wh

Default character encoding for ServletRequest

2009-10-01 Thread Halm Reusser
Hi, Calling <%= request.getCharacterEncoding() %> in a jsp deployed in a Tomcat 6.0.20 container returns null. Is there any possibility to force a default CharacterEncoding for such requests? Thanks in advance! Regards, -- SWITCH Serving Swiss Universities -- Halm Re