Uploaded image for project: 'Maven Plugin Tools'
  1. Maven Plugin Tools
  2. MPLUGIN-95

Output proper charset name in XDoc report for mojos

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.4
    • 2.4.2
    • API
    • None
    • Patch

    Description

      My original patch for MPLUGIN-76 has an unintended side effect: OutputStreamWriter.getEncoding() does not exactly report back the encoding supplied in the constructor. On a Sun JDK 1.6.0_04 for Windows, I observed that getEncoding() returnes "UTF8" instead of "UTF-8" as supplied in the constructor.

      This might not be an issue as long as the XML file is only processed by Java-based code, but

      1. the XML spec suggests to use the string "UTF-8" to indicate that encoding
      2. the IANA charset database does not mention "UTF8" as a valid alias for "UTF-8"
      3. some non-Java programs really fail on parsing such a XML due to "unsupported encoding"

      Attachments

        1. registered-charset-name.patch
          2 kB
          Benjamin Bentmann

        Issue Links

          Activity

            People

              hboutemy Herve Boutemy
              bentmann Benjamin Bentmann
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: