Sample document (UTF-8 encoded):
<?xml version="1.0" encoding="utf-16"?> ...

What seems to happen is that:

1.   XMLScanner guesses that the encoding is UTF-8
2.   XMLScanner reads the XML declaration and calls
setEncoding()
     with the encoding specified in the declaration
2.1  setEncoding deletes the current encoding string
(fEncodingStr)
     and sets it to NULL
2.2  setEncoding decides that the encoding is invalid and
returns
     false (at this point fEncodingStr is still NULL!)
3.   XMLScanner emits a warning and continues
4.   When XMLReader tries to make a transcoder using the
encoding
     string, it will crash with a NULL pointer exception

I couldn't find this bug on Bugzilla but is seems like this
must have come up before... Anyway, I'm looking for
workarounds unless there is an obvious one that someone else
has found :-)

--
Brian Quinlan
Python and XSLT Developer
[EMAIL PROTECTED]

Use the power of the dragon for your programming needs.
Download Komodo, our Mozilla-based, cross-platform IDE.
      http://www.ActiveState.com/Komodo




---------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to