On Tue, 3 May 2022 18:35:33 GMT, Naoto Sato <na...@openjdk.org> wrote:
>> I think 3 processes required for this testing. >> 1. Start test process on ja_JP.eucjp locale >> 2. Set the test data by encoder >> 3. Verify the encoded data by decoder >> >> To verify the encoded data, I think I need to check the byte data. > > Do we need to verify the intermediate byte encoding? Could we simply compare > the text given to environ.put() in Start process and System.getenv() in > Verify process match? Hello @naotoj . I think if 2nd process' encoder (like UTF-8) and 3rd process' decoder are same encoding, System.getenv() returns expected data. Actually the testcase checks 3 parts on Verify process: 1. Expected environment variable is defined or not (it uses System.getenv()) 2. Expected argument is received or not 3. Expected environment variable is encoded by proper encoding When I ran this testcase with jdk18.0.1, I got following result: Unexpected argument was received: \u6F22\u5B57<->\u7FB2\u221A\uFFFD Unexpected environment variables: \xE6\xBC\xA2\xE5\xAD\x97\x3D\xE6\xBC\xA2\xE5\xAD\x97 It means 1st test was passed, 2nd and 3rd test were failed. I don't think environment variable issue can be seen without 3rd test. Please let me know if you find out another way. ------------- PR: https://git.openjdk.java.net/jdk/pull/8378