Hi Jojo,
if Xerces is unable to detect that the file is Unicode, probably the XML
header is reporting an encoding that is not the correct one (i.e. it is
Unicode as you said, but starts with <?xml version="1.0"
encoding="something else"?>)
In any case you can force the InputSource to be treated as a specific
encoding by calling setEncoding()
Alberto
On 1/21/2011 5:05 AM, Jojo.jose wrote:
Hi All,
Please let me know, if anybody can provide some clue on this.
I have been using Xerces as XML parser in my application and I have recently
migrated my Xerces version from 1.3 to 3.1.
After that, when I call AbstractDOMParser::parse(const
xercesc_3_1::InputSource& source={...}) and passing a Unicode file as
input, it pops up exception. However the same works ok for ANSI.
The call stack is as shown below.
xerces-c_3_1.dll!xercesc_3_1::XMLScanner::scanProlog() Line 1227 + 0x25
bytes
xerces-c_3_1.dll!xercesc_3_1::IGXMLScanner::scanDocument(const
xercesc_3_1::InputSource& src={...}) Line 210
xerces-c_3_1.dll!xercesc_3_1::AbstractDOMParser::parse(const
xercesc_3_1::InputSource& source={...}) Line 549
EPConfigTool.dll!XCfgXMLParser::parse() Line 66 - My application code
It is working fine when I move back to version 1.3, but due to various other
requirements, I have to use the new version 3.1 in my application.
Thanks in advance,
Jojo
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]