DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6576>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6576

Exception on processing UTF-16 InputSource buffer with set encoding

           Summary: Exception on processing UTF-16 InputSource buffer with
                    set encoding
           Product: Xerces-C++
           Version: 1.6.0
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: Non-Validating Parser
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


When the parser parses the input source which is UTF-16 XML document and the 
encoding is set manually (not detected) then exception is thrown:

Fatal Error at (file u16.xml, line 1, char 8): 
The XML or Text declaration must start at line/column 1/1
---------------------------------------------------------------
Here is the example of code, that reproduces this problem:
(here u16.xml is an UTF-16 XML document starting from 0xFEFF,
Use MemParse sample to fastly reproduce this problem )
-------------------------
XMLCh* inFile = XMLString::transcode("u16.xml");
XMLCh* inEnc  = XMLString::transcode("UTF-16LE");

LocalFileInputSource* lfIS = new LocalFileInputSource( inFile );
// If you comment the next line all will be alright
lfIS->setEncoding(inEnc);
.....
parser->parse(*lfIS);

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

Reply via email to