Uploaded image for project: 'Xerces-C++'
  1. Xerces-C++
  2. XERCESC-2052

TranscodeToStr constructor throws TranscodingException claiming an invalid multi byte sequence when it is valid

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4
    • 3.2.0
    • Utilities
    • None
    • Windows 32 and 64 bit compiled with VS2010

    Description

      The following constructor throws an EncodingException

      TranscodeToStr tTransCoder (L"中国制造 / 中國製造","UTF-8", XMLPlatformUtils::fgMemoryManager);

      The code in TranscodeToStr::transcode allocates 26 bytes when 27 are needed, however, it does not reach the reallocation logic as charsRead is returned by trans->transcodeTo as zero. This only occurs in a Release build.

      Attachments

        Activity

          People

            amassari Alberto Massari
            nmeachen Nigel Meachen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: