Closed findepi closed 1 year ago
I don't think we want this. We should standardize on UTF-8 instead.
Since Java 9, resource bundles for internationalization (which are also properties files) are expected to be UTF-8 by default (see https://openjdk.org/jeps/226). Incidentally, this change would make it hard to use property resource bundles in an airlift-based project.
Since Java 9, resource bundles for internationalization (which are also properties files) are expected to be UTF-8 by default
Noticed that. Projects like Trino don't use resource bundles though Should i move this change to Trino?
Also, even if we say "i want my properties files to be treated as latin1 by maven" will editors / IDEs listen?
IntelliJ opens .properties
files using ISO-8859-1
by default.
IntelliJ docs say:
[...] Alternatively, you can define the default encoding for properties files on the project level and use a different API that can read properties files in the encoding you have defined.
https://www.jetbrains.com/help/idea/properties-files.html#encoding
I wonder if there's a way to make it adopt that setting from observing something in the pom, similar to how it handles the JDK version to use for the project.
in theory, this should already do it
https://github.com/trinodb/trino/blob/70d02427402818528cf8e76f0f760d54ed64df1c/.editorconfig#L4-L5
rebased and resolved conflict in CHANGES.
note that this addresses build-time warning from maven.
maven prints this warning-like message at INFO, so i will just ignore it
Properties files are standardized to be encoded with ISO-8859-1. maven-resources-plug now allows setting a specific encoding for properties files and even generates a build-time message when this configuration is not used.
This can be e.g. observed in a Trino build