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

Stephanie Crater duke at openjdk.org
Fri Jul 1 20:14:42 UTC 2022


> Backport to allow java to correctly parse Chinese characters in file paths and string arguments passed to java.exe.
> 
> 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`.

Stephanie Crater has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision:

  Backport 229344853126692d38ff7cb164dd5d17c5bf7fbb

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

Changes:
  - all: https://git.openjdk.org/jdk17u-dev/pull/522/files
  - new: https://git.openjdk.org/jdk17u-dev/pull/522/files/165db6d6..8fe08af2

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk17u-dev&pr=522&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk17u-dev&pr=522&range=00-01

  Stats: 0 lines in 0 files changed: 0 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk17u-dev/pull/522.diff
  Fetch: git fetch https://git.openjdk.org/jdk17u-dev pull/522/head:pull/522

PR: https://git.openjdk.org/jdk17u-dev/pull/522


More information about the jdk-updates-dev mailing list