[Home] [By Thread] [By Date] [Recent Entries]

  • From: David Megginson <david@m...>
  • To: xml-dev@l...
  • Date: Sun, 11 Mar 2001 17:08:35 -0500

Mike Brown writes:

 > My question was, when supplying a character stream to the parser, is it
 > reasonable to expect that the parser will not complain if the encoding
 > declaration says the encoding is (was) something the parser does not
 > support?

 > XML seems to assume that every parsed entity that a processor encounters
 > consists of encoded characters (bytes, essentially), whereas in practice
 > we obviously have parsers that accept the entities as characters.

Hmm -- I can see two reasonable arguments here:

1. With a Java character stream, there's no way to know what the
original encoding might have been, so the encoding declaration is
moot.

2. A Java character stream is presented (more-or-less) in UTF-16, so
the encoding declaration, if present, should agree with that.


All the best,


David

-- 
David Megginson                 david@m...
           http://www.megginson.com/

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member