<meta http-equiv="Content-Type" content="text/html; charset=windows-1253">
Remy Maucherat wrote:

Kazuhiro Kazama wrote:

Remy,

Tomcat 5.0 always adds a charset=ISO-8859-1 to the content type. While this is I think relatively legal, it is rather risky (it causes problems with some clients, as I've read on tomcat-user), and very dubious when dealing with non text data.


I received the report that the same(?) charset problem exists in
Tomcat 4.1.29 from Japanese developers. They said that Tomcat 4.1.27
is ok.

Could you check whether the same problem exists or not?

If not, I will analyze Tomcat 4.1.29 and send the patch.


This has been fixed already. However, I have to point out that the client is not compliant (not specifying a charset is equivalent to specifying charset=ISO-8859-1).

Remy

This might be true, but there is the "meta http-equiv" tag in HTML
that does not work as expected when setting the encoding in the HTTP response. If both HTTP encoding and "meta" HTML encoding are specified, the HTTP encoding takes precedence (according to section 5.2.2 of HTML 4.01 spec) and the users still need to manually set the encoding from the user-agents interface.


For example, imagine having a set of html files served by tomcat, which all are encoded with non iso-8859-1 encoding. Even if all of them have a meta tag with the correct encoding, tomcat adds by default the iso-8859-1 to the HTTP response. The user seens "grabage".

Please note that Apache server does the same in a default installation but this is simply unacceptable in a "multi-encoding" installation. I have to remove the relevant directive from the httpd.conf file in all apache installations because my users are not able to write non iso-8859-1 html files.

Please also note from section 5.2.2 of HTML 4.01
"The HTTP protocol ([RFC2616], section 3.7.1) mentions ISO-8859-1 as a default character encoding when the "charset" parameter is absent from the "Content-Type" header field. In practice, this recommendation has proved useless because some servers don't allow a "charset" parameter to be sent, and others may not be configured to send the parameter. Therefore, user agents must not assume any default value for the "charset" parameter."


I would add to this, that servers simply setting a character encoding by defualt to ALL responses is at least as bad as not setting at all.

Stefanos Karasavvidis



--
======================================================================
Stefanos Karasavvidis
Electronic & Computer Engineer
e-mail : [EMAIL PROTECTED]

Multimedia Systems Center S.A.
Kissamou 178
73100 Chania - Crete - Hellas
http://www.msc.gr

Tel : +30 2821 0 88447
Fax : +30 2821 0 88427

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to