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

Win32LCPTranscoder::transcode doesn't handle wcstombs errors

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Resolution: Fixed
    • 2.1.0
    • 2.2.0
    • Utilities
    • None
    • Operating System: Windows XP
      Platform: PC
    • 13584

    Description

      I have had troubles with converting XMLCh string into char* in MSVC6.
      When converting a XMLCh string containing characters with codes greater than
      255, I have got strings of correct lengths, but the content was correct up to
      the first character >255. Win32LCPTranscoder::transcode will stop and the rest
      of the string is not filled, if such a character occurs.

      When debugging, I observed that LC_CTYPE should be set, so I used setlocale(
      LC_CTYPE, "Czech_Czech.1250") and the problem was solved. But everybody is not
      able to debug xercesc, so I think there should be some error tracking, if
      transcode function fails.

      Maybe also add a short notice about setlocale into xercesc documentation.

      Attachments

        Activity

          People

            Unassigned Unassigned
            vminarik@ips-ag.cz Vojtech Minarik
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: