On 06.02.2020 14:44, Mark Thomas wrote:
On 06/02/2020 13:39, Garret Wilson wrote:
On 2/6/2020 10:36 AM, Mark Thomas wrote:
Whether Tomcat should ship with this setting present in conf/web.xml
by default is something that should probably be discussed for Tomcat
10. Given the current state of the web, there is a reasonable case for
doing so. I'll add that to the TOMCAT-NEXT discussion list.
Is this still on the list for discussion for Tomcat 10?
No, because it has already been implemented for Tomcat 10 and is in the
milestone release currently being voted on.

Waitasec. I'm not used to good news, so I want to make sure I understand
what you're saying. Are you saying that the proposed Tomcat 10
implementation already interprets encoded octets in web form submissions
using UTF-8 by default?!! :O

As of Tomcat 10, conf/web.xml contains the following:

<!--
   Set the default request and response character encodings to UTF-8.
-->
<request-character-encoding>UTF-8</request-character-encoding>
<response-character-encoding>UTF-8</response-character-encoding>

That *should* have the effect you are looking for but I confess I
haven't tested it in any great detail.


As I am sure many people (Christopher included) would agree, the real solution would be for browsers and other HTTP clients to indicate clearly in the request, the charset/encoding of each text parameter that they are sending.
There are even HTTP headers already defined for that.
(Nowadays the default could be Unicode/UTF-8).

The problem is that browsers and other agents don't do that, although they undoubtedly always know themselves, and although it would solve a series of issues that have literally been there forever at the server and application level (*).

I have often wondered if/why the Apache Foundation does not pack enough influence over the HTTP/HTML specifications process and over browser producers, to achieve that.
(And if not the Apache Foundation, then who ?)


(*) My own guess is that this basic thing (or lack of it) has cost over the years many thousands of lines of unnecessary code and many thousands of unproductive developer hours. As a tiny example, just consider the above web.xml parameters, and how much time in total was dedicated to their definition and implementation.. Never mind all the previous related filters and valves and their discussions on this list. And that's only for Tomcat.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to