RFR: 8272352: Java launcher can not parse Chinese character when system locale is set to UTF-8 [v2]

Naoto Sato naoto at openjdk.java.net
Tue May 3 18:55:52 UTC 2022


> Java runtime has been detecting the Windows system locale encoding using `GetLocaleInfo(GetSystemDefaultLCID(), LOCALE_IDEFAULTANSICODEPAGE, ...)`, but it returns the *legacy* ANSI code page value, e.g, 1252 for US-English. In order to detect whether the user has selected `UTF-8` as the default, the code page has to be queried with `GetACP()`.
> Also, the case if the call to `GetLocaleInfo` fails changed to fall back to `UTF-8` instead of `Cp1252`.

Naoto Sato has updated the pull request incrementally with one additional commit since the last revision:

  Default to UTF-8 if malloc fails

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/8434/files
  - new: https://git.openjdk.java.net/jdk/pull/8434/files/cde671cf..e04e0fb6

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8434&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8434&range=00-01

  Stats: 3 lines in 1 file changed: 3 ins; 0 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8434.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8434/head:pull/8434

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


More information about the core-libs-dev mailing list