Integrated: 8272352: Java launcher can not parse Chinese character when system locale is set to UTF-8
Naoto Sato
naoto at openjdk.java.net
Thu May 5 20:02:48 UTC 2022
On Wed, 27 Apr 2022 20:23:32 GMT, Naoto Sato <naoto at openjdk.org> wrote:
> 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`.
This pull request has now been integrated.
Changeset: 22934485
Author: Naoto Sato <naoto at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/229344853126692d38ff7cb164dd5d17c5bf7fbb
Stats: 15 lines in 1 file changed: 6 ins; 4 del; 5 mod
8272352: Java launcher can not parse Chinese character when system locale is set to UTF-8
Reviewed-by: rriggs
-------------
PR: https://git.openjdk.java.net/jdk/pull/8434
More information about the core-libs-dev
mailing list