On Mon, 4 Jan 2021 21:06:46 GMT, Chris Plummer <cjplum...@openjdk.org> wrote:

> There are probably 25 or so places in our code where we use FormatMessage to 
> get the error message. Are these all going to run into the same 
> FormateMessage bug?

jdk.hotspot.agent do not have `FormatMessage()` call in other place.
Did you say about whole JDK code? I haven't checked all of them, but some code 
(e.g. net_util_md.c) uses `JNU_ThrowByName()` which is provided by java.dll.

> Also, it's not clear to me why you are getting garbled text in the first 
> place. You said "Windows API might not return UTF-8 encoded string on 
> Japanese locale." Why is that the case?

Japanese locale on Windows uses CP932., so `FormatMessage()` would return error 
message with Japanese chars which are encoded by CP932. It is not UTF-8.

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

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

Reply via email to