tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Tomcat 5 and UTF-8
Date Fri, 03 Apr 2009 21:37:09 GMT
Hash: SHA1


On 4/2/2009 1:30 PM, Je suis la poubelle wrote:
> On Fri, Mar 27, 2009 at 5:34 PM, Christopher Schultz <>
>> While it's not a terrible idea to specify the encoding in both places,
>> you should consider the possibility that the META tag can be wrong.
>      It's not only "not a terrible idea", but a good habit to do so.  Just
> like the principle of "double check": what's the point of double check if
> everything works as expected?  We do "double check" because in practice we
> are subject to errors.

The problem is when the web server sends a response, it sends it using a
particular character set (let's just say UTF8 for argument's sake). If
you also report that the character set is UTF8 in the META tags, then
it's only valid if the client saves the file to the disk with that same
character encoding. If a different encoding is being used, then the file
is "lying" about its own encoding.

> A good programmer should never leave anything to chance, that's why
> it's good to set charset in both HTTP header as well as in HTML header.

I've never used META to set the content type of a web page, and things
seem to be working just fine over here. <shrug>

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


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

View raw message