tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: Problem with Transfer-Encoding
Date Tue, 08 Jul 2014 07:52:53 GMT
2014-07-07 21:07 GMT+04:00 Terence M. Bandoian <terence@tmbsw.com>:
> On 7/5/2014 6:36 PM, André Warnier wrote:
>>
>
>
> I agree with André about the difficulties of debugging character encodings.
> A couple of things you might check are the character encodings of the page
> and the form.  The character encoding of the page may be set with the
> Content-type meta tag:
>
> <meta http-equiv="Content-type" content="text/html;charset=UTF-8"/>
>

Setting explicit value for "content" attribute like that is risky. The
value must match the Content-Type HTTP header produced by web server.
If they do not match, some browsers ignore both and start guessing the
encoding.

I usually write it as

<%@ page contentType="text/html; charset=UTF-8" %>
...
<META http-equiv="Content-type" content="<%=response.getContentType() %>">

Best regards,
Konstantin Kolinko

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


Mime
View raw message