tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Brownell <davi...@pacbell.net>
Subject Re: Tomcat on IBM OS/390?
Date Fri, 19 Nov 1999 19:57:27 GMT
"Preston L. Bannister" wrote:
> 
> From: David Brownell [mailto:david-b@pacbell.net]
> 
> > First try it without transcoding anything at all.  It should
> > work just fine.  If it doesn't, that's a bug.

So, did you try this?

I really get the impression that you didn't bother to try it
before whipping off your response.


> > Then if that works, try the transcoding but make sure you give
> > the appropriate XML declaration, like
> >
> >       <?xml version='1.0' encoding='EBCDIC-CP-US'?>
> >
> > If you don't provide such a declaration, things are pretty
> > much guaranteed to break -- as in, if they don't, it's a bug.
> 
> Do you know that EBCDIC is an entirely different character
> encoding than ASCII?

Did you know that ASCII is a strict subset of UTF-8, which is
the encoding that an XML processor MUST assume for its input
text, in the absence of an XML declaration?

Did you know that there's an algorithm in the XML specification
(found in Appendix B) describing how to autodetect encodings
such as EBCDIC?  Based on the presence of an XML declaration
at the beginning of a file of XML text?  And that Sun's parser
implements that algorithm?


> > EBCDIC should work just fine -- if, and only if, you declare
> > it correctly.  That XML book would be wrong; use whatever
> > encoding you really want, but if it's not UTF-8 or UTF-16
> > (or honest 7-bit ASCII) you _must_ declare its encoding.
> 
> The book is Charles Goldfarb/Paul Prescod's "The XML Handbook"
> though the interpretation is mine :).

Then it's your interpretation that's faulty.  Have a look at
the XML specification, appendix F.

- Dave

Mime
View raw message