Hi gurus,
I am having a new problem today:
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00283: document encoding is UTF-8-based but default input encoding is not
I don't know what happened at the source of the xml that I am handling. I have had this working for a whole year now. Today I am having this error. I have had other similar problems when our partner sends me a xml with mixed encoding, and I was told by someone here that that problem has been fixed in patch 10.2.0.5, but we are still waiting for it. By the way, this xml is different from what I get through messaging gateway, and it is a bigger file (the court's daily criminal statutes update). Here is the URL:
http://www.mncourts.gov/documents/0/Public/Integration_Services/SimpleTypes/StatutoryChargingOffenseType.xml (Mark helped me with his brilliance to process this file).
I looked up the Oracle doc and tried to convert the CLOB var that I use to receive the xml through an HTTP call (UTL_HTTP) into a BLOB by passing in the CSID (NLS_CHARSET_ID('WE8MSWIN1252')), using the dbms_lob function, but I still get same error.
The Oraclce doc says this,
Cause
The input document was detected to be ASCII (or EBCDIC) based, but no encoding was specified in the XMLDecl and the default input coding was not ASCII (or EBCDIC) based, so could not be applied.
Action
Add an explicit encoding specification to the XMLDecl so the default input encoding is not needed, or pick a default encoding which matches the input document.
But I don't know where to look for the XMLDecl. I only found this and tried it as above mentioned.
FINAL CONSTRUCTOR FUNCTION XMLTYPE RETURNS SELF AS RESULT
Argument Name Type In/Out Default?
------------------------------ ----------------------- ------ --------
XMLDATA BLOB IN
CSID NUMBER IN
SCHEMA VARCHAR2 IN DEFAULT
VALIDATED NUMBER IN DEFAULT
WELLFORMED NUMBER IN DEFAULT
I also googled this error and found a few other people have the same problem, and one found on OTN:
535046
I asked the DBA what would happen if we change our database character set to UTF-8 and he said he does not know.
Any help is apprciated.
Thank you very much!
Ben