Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-7461

Groovy doesn't write BOM if UTF-16 alias is used

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.3
    • Fix Version/s: 2.4.4
    • Component/s: groovy-jdk
    • Labels:
      None

      Description

      The newWriter(charset, append), File.append(text, charset), File.write(text, charset) methods all don't write the UTF-16 BOM if an alias for UTF-16 is used. For example, if the "UTF_16LE" alias for "UTF-16LE" is used, no BOM is written even though a BOM is written for the canonical name. This is because writeUTF16BomIfRequired(charset, stream) only checks for the canonical name, and not any aliases.

        Attachments

          Activity

            People

            • Assignee:
              glaforge Guillaume Laforge
              Reporter:
              keegan Keegan Witt
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: