RFR: 8265989: System property for the native character encoding name
alanb at openjdk.java.net
Thu Apr 29 14:43:55 UTC 2021
On Thu, 29 Apr 2021 14:12:29 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
> 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?
Agree an API would be better. We've looked at it a few times but have concerns that it would be confusing to most developers, esp. if it were another static method on Charset. System and Runtime have been examined too. The proposal here doesn't preclude adding an API in the future, it's mostly a question on whether it is needed and where would it be defined.
More information about the core-libs-dev