Re: ReaderInputStream vs XmlParser declared and detected encodings
Chris Burdess <[email protected]>
| Newsgroups | gmane.comp.java.classpath.extensions.xml |
|---|---|
| Message-ID | <[email protected]> |
Mark Wielaard wrote: > On Sun, 2004-12-05 at 16:46, Mark Wielaard wrote: >> But this seems a deeper problem with handling InputStream <-> Reader >> interaction combined with XML documents that declare their own >> encoding. >> I don't have a clue how to handle it properly though since when you >> use >> a Reader you do that to hide the underlying encoding in the first >> place, >> so it doesn't mix well with documents declaring their own encoding >> format... Right. XML doesn't make a lot of sense with Readers, and I consider the specification of character streams in the SAX and JAXP APIs to be a design error. > Sigh. And indeed I ran into some more problems like these. > Attached is a patch that got me a little further. > > There is one bugfix not related to Readers/InputStreams, encoders and > friends in gnu/xml/libxmlj/transform/GnomeTransformer.java for the case > source == null (plus some extra code to make debugging easier). Thanks! -- Chris Burdess