I'm not sure what release I have (is there somewhere in the sources I can
look to determine the version?), but I'm getting a crash when someone
creates a bogus XML file that is UTF-8 encoded, but has a
<?xml version='1.0' encoding='UTF-16'?>
in it.

What appears to happen is that Xerces catches the error just fine in
XMLReader::setEncoding,
but then in DTDValidator::scanTextDecl, it calls emitError with the
XML4CErrs::ContradictoryEncoding error passed in.
Since XML4CErrs::ContradictoryEncoding is < E_LowBounds, emitError doesn't
throw.

Xerces then continues on, and crashes later in makeNewTranscoderFor,
probably because fEncodingString was set to NULL in setEncoding.

It seems to me that if you get a contradictory encoding, it should fail
immediately; since otherwise, it would have to guess what the encoding was,
and could possibly be wrong.


        Thanks,
        --Will

Westside: The platform for real business needs.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to