On Sun, 1 May 2022 04:51:17 GMT, Ichiroh Takiguchi <itakigu...@openjdk.org> 
wrote:

>> On JDK19 with Linux ja_JP.eucjp locale,
>> System.getenv() returns unexpected value if environment variable has 
>> Japanese EUC characters.
>> It seems this issue happens because of JEP 400.
>> Arguments for ProcessBuilder have same kind of issue.
>
> Ichiroh Takiguchi has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   8285517: System.getenv() returns unexpected value if environment variable 
> has non ASCII character

Can you clarify the use of different charset properties for the 
ProcessEnvironment vs the CommandLine strings?

They are used to decode or encode strings in the APIs to native functions 
respectively.
If I understand `native.encoding` was introduced to reflect the default 
encoding of file contents, while `sun.jnu.encoding` is used to encode filenames.

I think I would have expected to see `sun.jnu.encoding` to be used in all 
contexts when encoding/decoding strings to the native representations.  
(Assuming its not required for backward compatibility).

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

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

Reply via email to