Draft JEP: To use UTF-8 as the default charset for the Java virtual machine.

Robert Muir rcmuir at gmail.com
Wed Feb 21 14:26:09 UTC 2018


On Wed, Feb 21, 2018 at 8:55 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:

> Good progress was made via JDK-8183743 [1] in Java SE 10 to add constructors
> and methods that take a Charset and eliminate the historical
> inconsistencies. The issue of legacy FileReader/FileWriter is linked from
> that JIRA issue.
>

Can we ensure we have CharsetDecoder/Encoder params too? There is
unfortunately a huge difference between InputStreamReader(x,
StandardCharsets.UTF_8) and InputStreamReader(x,
StandardCharsets.UTF_8.newDecoder()). And the silent replacement of
the "easier" one is probably not what most apps want.


More information about the core-libs-dev mailing list