[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: well-formedness error
On 6/16/04 7:29 PM, "Sam Ruby" <rubys@xxxxxxxxxxxxxxxx> wrote:
>
> As far as I know, NONE of the popular libraries, on all the popular
> platforms, and in all the popular languages, take RFC 3023 into
> consideration. Nor do they provide ANY mechanism for the caller to
> indicate the "Presence of External Encoding Information" [1].
>
> The way the feed validator accomplishes this function is to actually
> open the stream, peek at the first few bytes, determine the declared
> encoding, and actually REPLACE the prolog if necessary to get these to
> match.
>
> Perhaps somebody out there will know of one or more libraries that
> actually do provide such support or interface; and if so, I would be
> interested in hearing about it.
Doesn't Xerces let you do this? It's been a while, but I vaguely remember
that this support was buggy, or had no effect, when I was using it. Reading
up on recent developments, they say it works now.
http://java.sun.com/j2se/1.4.2/docs/api/org/xml/sax/InputSource.html#setEnco
ding(java.lang.String)
Robert Sayre