Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-164

Content-length set incorrectly for multi-byte encoding

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 0.9.1252
    • 0.9.840
    • {Unused} Packaging
    • None
    • Xwiki running with unicode
    • unicode truncate utf-8 content length

    Description

      Utils.parseTemplate sets the content length to the string length rather than the number of bytes. This ends up truncating the returned data when using a multi-byte encoding scheme such as utf-8. The content length should instead be set to the number of bytes: content.getBytes().length

      Attachments

        Issue Links

          Activity

            People

              wr0ngway Matthew Conway
              wr0ngway Matthew Conway
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: