Created attachment 434382 [details] The sample data Description of problem: Xerces-C can not deal with GBK file Version-Release number of selected component (if applicable): 2.7.0-9 How reproducible: 100% Steps to Reproduce: Compare the SAXPrint sample , and pass the attached xml to it. Actual results: Failure Expected results: Additional info: Please rebuild the xerces with IconvGNU or ICU, and check the following code for potential bug. ICUTranscoder::transcodeFrom UErrorCode err = U_ZERO_ERROR; ucnv_toUnicode ( fConverter , &startTarget , startTarget + maxChars , (const char**)&startSrc , (const char*)endSrc , (fFixed ? 0 : (int32_t*)fSrcOffsets) , false , &err ); There seems need a mute to protect fConverter. ICULCPTranscoder::calcRequiredSize called ' XMLMutexLock lockConverter(&fMutex); ' to do it. IconvGNUTranscoder::transcodeFrom for (size_t cnt = 0; cnt < maxChars && srcLen; cnt++) { size_t rc = iconvFrom(startSrc, &srcLen, &orgTarget, uChSize()); if (rc == (size_t)-1) { if (errno != E2BIG || prevSrcLen == srcLen) { ThrowXMLwithMemMgr(TranscodingException, XMLExcepts::Trans_BadSrcSeq, getMemoryManager()); } } charSizes[cnt] = prevSrcLen - srcLen; prevSrcLen = srcLen; It do not deal with errno==EINVAL, which will happen when it is called by XMLReader::refreshCharBuffer with an incomplete MBCS character. I mean, one half is in buffer, and the other half is left on disk.
Xerces is planning a fix for the next release. See https://issues.apache.org/jira/browse/XERCESC-1936?focusedCommentId=12906970&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12906970
I don't have commit access to EL5. As I understand it, the EPEL5 version should be retired, but the retirement process was not executed: https://fedoraproject.org/wiki/How_to_remove_a_package_at_end_of_life https://admin.fedoraproject.org/pkgdb/acls/name/xerces-c
Fedora EPEL 5 changed to end-of-life (EOL) status on 2017-03-31. Fedora EPEL 5 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora or Fedora EPEL, please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.