tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Default character encoding for ServletRequest
Date Wed, 07 Oct 2009 17:43:19 GMT
Hash: SHA1


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 HTML page with contentType="text/html;
> charset=utf-8"
> 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?

See the W3C document for the <form> element, specifically the
"accept-charset" attribute:

Read the part about "UNKNOWN" and how clients MAY interpret this as "use
the current page encoding". This is "RFC 'MAY'" which basically means
it's a recommendation, but not at all required.

If you configure your form like this, the client is essentially required
to use your specified encoding if it expects the server to behave correctly:

<form action="..." method="POST" accept-charset="UTF-8">

Give that a try and see what happens.

- -chris
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message