[
https://issues.apache.org/jira/browse/IO-414?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17772972#comment-17772972
]
Elliotte Rusty Harold commented on IO-414:
------------------------------------------
something weird happened here. I see the bug after reverting the revert
commits, but it's not something I wrote or included in my PR.
The bug is the addition of this line in IOUtils:
Charset cs =
StandardCharsets.UTF_16.equals(Charsets.toCharset(charset)) ?
StandardCharsets.UTF_16 : StandardCharsets.UTF_16BE;
Where did that come from? I don't see it in any PR.
I think commons-io needs to protect the master branch && require squash and
merge for all commits. That would make this easier to track.
> IOUtils.writeLines is not correct with a charset with BOM
> ---------------------------------------------------------
>
> Key: IO-414
> URL: https://issues.apache.org/jira/browse/IO-414
> Project: Commons IO
> Issue Type: Bug
> Components: Streams/Writers, Utilities
> Affects Versions: 2.4, 2.5
> Reporter: Florent Brosse
> Priority: Major
> Fix For: 2.14.1
>
>
> When a charset has a BOM (like UTF-16), the method IOUtils.writeLines put 2
> BOM on each line.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)