Uploaded image for project: 'XalanC'
  1. XalanC
  2. XALANC-535

If an error/warning message contains not-displayable character for the local encoding , no message is shown at all

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: CurrentCVS
    • Fix Version/s: CurrentCVS
    • Component/s: XalanC
    • Labels:
      None
    • Environment:
      all

      Description

      For an input:
      <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      version="1.0">
      <xsl:output encoding='XML' version='1.0'/>
      <xsl:template match="/">
      <out>
      <xsl:element name='Somename_
'/>
      </out>
      </xsl:template>
      </xsl:stylesheet>

      output:
      <?xml version="1.0" encoding="UTF-8"?><out/>

      In the XalanDOMString.cpp, "doTranscodeToLocalCodePage" function

      ...
      if (wcstombs(&theTargetVector[0], theTempSource, targetLen) == ~size_t(0))
      {
      theTargetVector.clear();
      return false;
      }
      ...
      "wcstombs" fails and we return the empty vector . Probably solution here may be, if transcoding to the local code page fails , try to transcode to UTF8 and return the vector

        Attachments

        1. patch2.txt
          15 kB
          Dmitry Hayes
        2. patch.txt
          4 kB
          Dmitry Hayes

          Activity

            People

            • Assignee:
              dmitryh@ca.ibm.com Dmitry Hayes
              Reporter:
              dmitryh Dmitry Hayes
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: