[ 
https://issues.apache.org/jira/browse/GROOVY-7461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Keegan Witt updated GROOVY-7461:
--------------------------------
    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.  (was: 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.)

> Groovy doesn't write BOM if UTF-16 alias is used
> ------------------------------------------------
>
>                 Key: GROOVY-7461
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7461
>             Project: Groovy
>          Issue Type: Bug
>          Components: groovy-jdk
>            Reporter: Keegan Witt
>            Assignee: Guillaume Laforge
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to