tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean Bridges <sbridges....@yahoo.com>
Subject Re: charset encoding bug
Date Wed, 25 Apr 2007 00:26:56 GMT
Thanks Rashmi for clearing that up.  I will try to get
spring to stop setting the Locale.

>Christopher writes
> The character set has to be chosen at some point. It

> looks like what you are suggesting is that you want 
> to actually report an incorrect character set (or 
> none, which is just as bad) to the client.

Also according to section 3.2 of
http://www.ietf.org/rfc/rfc3023.txt,

[SNIP]
On the other hand, it has been argued that the charset
parameter should be omitted and the mechanism
described in Appendix F of [XML] (which is
non-normative) should be solely relied on.  This
approach would allow users to avoid configuration of
the charset parameter; an XML document stored in a
file is likely to contain a correct encoding
declaration or BOM (if necessary), since the operating
system does not typically provide charset information
for files.  If users would like to rely on the
encoding declaration or BOM and to hide charset
information from protocols, they may determine not to
use the parameter.
[/SNIP]

This is the approach I generally prefer to use,
passing the xml parsing/serializing library streams
rather than readers/writers, and letting the library
deal with the character encoding issues.  For this we
need to use a content type of application/xml.

In our app, the problem isn't limited to xml files. 
We are also serving application/zip;charset=.... which
is a bit odd.

Sean

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Mime
View raw message