[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qexo-general] Strange special character problem
From: |
Per Bothner |
Subject: |
Re: [Qexo-general] Strange special character problem |
Date: |
Tue, 07 Feb 2006 13:26:30 -0800 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.8.0.1) Gecko/20060130 SeaMonkey/1.0 |
Markus Skistad wrote:
I'm using kawa-1.8 against a ISO-8859-1 xml document.
Without a testcase I can't tell if the problem is the the XMLPrinter
(as you hypothesize), but I actually suspect the XML parser.
Kawa's builtin XML parser is rather basic. It doesn't handle
byte->character handling, but uses the standard Java Reader support.
It specifically does not handle encoding declarations.
Of course one could fix the Kawa XML parser to be more conformant.
but I don't think that makes sense. Better to switch to using a
more conformant XML parser - specifically a parser conformant to
JAXP. Since JDK 1.4 comes with a standard XML parser, we should
use that, when available.
The existing Kawa parser is useful as an option, when JAXP isn't
available or when one needs a quick and dirty XML parser. There
should be a way to select a parser, but the default should be
the JAXP parser when it is available.
This would also give us the option of validation.
I'm not very familiar with JAXP and I haven't had time to spend
on this so far. A volunteer to look into this would be appreciated.
--
--Per Bothner
address@hidden http://per.bothner.com/