You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Palle Girgensohn <gi...@partitur.se> on 2000/12/06 01:43:48 UTC
[PATCH] bad default charset encoding in jsp pages
Hi!
jsp pages served by tomcat contain a bad charset string in
their http header. This is not understood by some non iso8859-1
systems/browsers. Macintosh w/ netscape 4.76, for example
will fail to understand that 8859_1 is actually ISO-8859-1.
According to
jakarta-tomcat/src/webpages/docs/api/javax/servlet/ServletResponse.html,
the reply should be "ISO-8859-1". According to IANA,
the 8859_1 is *not* a way to say ISO-8859-1 in MIME headers
<http://www.isi.edu/in-notes/iana/assignments/character-sets>:
Name: ISO_8859-1:1987 [RFC1345,KXS2]
MIBenum: 4
Source: ECMA registry
Alias: iso-ir-100
Alias: ISO_8859-1
Alias: ISO-8859-1 (preferred MIME name)
Alias: latin1
Alias: l1
Alias: IBM819
Alias: CP819
Alias: csISOLatin1
are all allowed ways to describe a character set. 8859_1 is
apparently not one of them, although Java uses this string
internally, which is fine...
Hence, I vote for my enclosed patch, so Mac users can benefit
from tomcat jsp pages. ;-)
>To repeat:
create a simple jsp page with some latin1 characters, like åäö.
serve this page with tomcat to a Macintosh w/ netscape 4.76.
You won't get åäö, but other strange characters instead.
Cheers,
Palle
--
Partitur Informationsteknik AB
Wenner-Gren Center +46 8 566 280 02
113 46 Stockholm +46 70 785 86 02
Sweden girgen@partitur.se