Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-24

XMLReporter writes incorrect encoding in XML-file

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5 (2.1 plugin)
    • 1.5.2 (2.1.2 plugin)
    • None
    • None
    • Windows XP, Danish locale, Cp1252 encoding

    Description

      XMLReporter.java writes the outputted xml-file in the platform default encoding, but writes an encoding of UTF-8 in the XML header.

      On my machine, with a platform default encoding of Cp1252, this causes the surefire report plugin to fail with a "org.xml.sax.SAXParseException: Invalid byte 2 of 3-byte UTF-8 sequence".

      The attached patch ensures, that the outputted XML-file is always written in UTF-8 encoding, so that it matches the header in the file.

      Attachments

        1. XMLReporter.patch
          0.7 kB
          Simon Kepp Nielsen

        Issue Links

          Activity

            People

              carlos Carlos Sanchez Gonzalez
              kepp Simon Kepp Nielsen
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: