TranscodeFromStr fails with invalid UTF8 encoded strings
--------------------------------------------------------

                 Key: XERCESC-1916
                 URL: https://issues.apache.org/jira/browse/XERCESC-1916
             Project: Xerces-C++
          Issue Type: Bug
          Components: DOM
         Environment: WIN32, Solaris32
            Reporter: Kristian Ivarsson
             Fix For: 3.0.1


If you got an invalid encoded UTF-8-sequence, the TranscodeFromStr ends up by 
throwing a OutOfMemoryException and if you use XMLTranscoder::transcodeFrom() 
directly you'll somehow probably end up in a loop that never ends, 'cause it 
stops to consume/eat bytes. Shouldn't there be some "InvalidEncodingException" 
instead ?

...
const char string[] = "HÖPP";
const int size = strlen( string);
xercesc::TranscodeFromStr transcoder( reinterpret_cast<const XMLByte 
*>(string), size, "UTF8");
// OutOfMemoryException


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to