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

Iconv calcRequiredSize() fails with multibyte encoding like UTF8

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Resolution: Fixed
    • 2.4.0
    • 2.5.0
    • Utilities
    • None
    • Operating System: HP-UX
      Platform: HP
    • 26886

    Description

      IconvLCPTranscoder::calcRequiredSize (const char* const srcText,..) calculates
      the size incorrectly when character encoding is a variable width encoding like
      UTF8.

      Depending of how many bytes the first character of the string to be transcoded
      takes, it is assumed that all characters take the same amount, which is not
      true with UTF8 or GB2312.

      It seems that this bug has been introduced in version 2.2
      (IconvTransService.cpp rev 1.10).
      Same bug has been fixed in Win32 transcoder, see bug #23095.

      regards,
      Mika

      Attachments

        Activity

          People

            Unassigned Unassigned
            ext-mika.stewen@nokia.com ext-mika.stewen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: