On Wed, 28 Apr 2021 22:24:31 GMT, Naoto Sato <na...@openjdk.org> wrote:

> After some internal discussion, we thought it was good to expose the native 
> environment's default character encoding, which Charset.defaultCharset() is 
> currently based on. This way applications will have a better migration path 
> after the [JEP 400](https://openjdk.java.net/jeps/400) is implemented, in 
> which Charset.defaultCharset() will return UTF-8, but the value of this new 
> system property will remain intact. A 
> [CSR](https://bugs.openjdk.java.net/browse/JDK-8266075) has been filed with 
> more detailed information.

Naive question: any reason as to why we're not providing a new static API 
method in Charset to return the platform encoder? This initially will return 
same thing as Charset.defaultEncoder - but as JEP 400 is delivered the two will 
diverge. Any reason as to why we don't want to expose the platform encoder in 
the API?

-------------

PR: https://git.openjdk.java.net/jdk/pull/3777

Reply via email to