<i18n dev> RFR: 8301991: Convert l10n properties resource bundles to UTF-8 native

Justin Lu jlu at openjdk.org
Tue Sep 12 22:04:12 UTC 2023


JDK .properties files still use ISO-8859-1 encoding with escape sequences. It would improve readability to see the native characters instead of escape sequences (especially for the L10n process). The majority of files changed are localized resource files.

This change converts the Unicode escape sequences in the JDK .properties files (both in src and test) to UTF-8 native characters. Additionally, the build logic is adjusted to read the .properties files in UTF-8 while generating the ListResourceBundle files.

The only escape sequence not converted was `\u0020` as this is used to denote intentional trailing white space. (E.g. `key=This is the value:\u0020`)

The conversion was done using native2ascii with options `-reverse -encoding UTF-8`.

If this PR is integrated, the IDE default encoding for .properties files need to be updated to UTF-8. (IntelliJ IDEA locks .properties files as ISO-8859-1 unless manually changed).

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

Commit messages:
 - Update header / copyright for CurrencyFormat
 - Adjust CurrencyFormat test to read in .properties with UTF-8
 - Convert unicode escape sequences to native
 - Add clarifying comment in Bug6204853 for lack of conversion
 - Read JDK properties files in UTF-8 during build process for LRB

Changes: https://git.openjdk.org/jdk/pull/15694/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15694&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8301991
  Stats: 28966 lines in 488 files changed: 14 ins; 0 del; 28952 mod
  Patch: https://git.openjdk.org/jdk/pull/15694.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/15694/head:pull/15694

PR: https://git.openjdk.org/jdk/pull/15694


More information about the i18n-dev mailing list