+
Skip to content

Prefer usage of StandardCharsets.UTF_8 over "UTF-8" charset reference #35080

@thomasdarimont

Description

@thomasdarimont

Description

We should use the StandardCharsets.UTF_8 whenever possible.

Discussion

Note that there might be reasons where using StandardCharsets.UTF_8 is not applicable, e.g. if the API level of a module is set to Java 8 for compatibility reasons and the API accepting a CharSet is from a newer JDK.

Also there might be APIs which do not support the CharSet type.

In those cases we must keep the "UTF-8" charset usage.

Motivation

Consistency and efficiency.

Details

No response

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载