Re: Review request: JDK-8016579 (process) IOException thrown by ProcessBuilder.start() method is incorrectly encoded (v.3)

2013-07-18 Thread Alexey Utkin
On 7/17/2013 10:29 PM, Dan Xu wrote: I don't know the difference between (*env)-NewStringUTF(env, buf) and JNU_NewStringPlatform(env, buf). Does the JNU_NewStringPlatform() function currently fail to process non-western locale? According to the code, JNU_NewStringPlatform() is also trying to

Re: Review request: JDK-8016579 (process) IOException thrown by ProcessBuilder.start() method is incorrectly encoded (v.3)

2013-07-18 Thread Dan Xu
I see. Thanks for your good explanation. The change looks good to me. -Dan On 07/18/2013 12:56 AM, Alexey Utkin wrote: On 7/17/2013 10:29 PM, Dan Xu wrote: I don't know the difference between (*env)-NewStringUTF(env, buf) and JNU_NewStringPlatform(env, buf). Does the JNU_NewStringPlatform()

Re: Review request: JDK-8016579 (process) IOException thrown by ProcessBuilder.start() method is incorrectly encoded (v.3)

2013-07-17 Thread Alexey Utkin
Thanks, Here is new version with Dan's correction: http://cr.openjdk.java.net/~uta/openjdk-webrevs/JDK-8016579/webrev.02/ Regards, -uta On 7/16/2013 11:07 PM, Dan Xu wrote: I agree. Is jdk_util.c or jni_util.c or any file under native/common/ a good place? The fix looks good to me. One

Re: Review request: JDK-8016579 (process) IOException thrown by ProcessBuilder.start() method is incorrectly encoded (v.3)

2013-07-17 Thread Dan Xu
I don't know the difference between (*env)-NewStringUTF(env, buf) and JNU_NewStringPlatform(env, buf). Does the JNU_NewStringPlatform() function currently fail to process non-western locale? According to the code, JNU_NewStringPlatform() is also trying to use the right encoding for the give

Re: Review request: JDK-8016579 (process) IOException thrown by ProcessBuilder.start() method is incorrectly encoded (v.2)

2013-07-16 Thread Alexey Utkin
Here is new version of fix: http://cr.openjdk.java.net/~uta/openjdk-webrevs/JDK-8016579/webrev.01/ On 7/15/2013 9:08 PM, Martin Buchholz wrote: Superficial review: Looks good mostly. Historically, switching windows code to use W APIs has been a big TODO, but was waiting for Win98 de-support.

Re: Review request: JDK-8016579 (process) IOException thrown by ProcessBuilder.start() method is incorrectly encoded (v.2)

2013-07-16 Thread Dan Xu
I agree. Is jdk_util.c or jni_util.c or any file under native/common/ a good place? The fix looks good to me. One small comment is to get the return value of swprintf() in win32Error(). If the return value is -1, an error situation needs to be handled even though it seems very rare. If it is

Review request: JDK-8016579 (process) IOException thrown by ProcessBuilder.start() method is incorrectly encoded

2013-07-15 Thread Alexey Utkin
Bug description: https://jbs.oracle.com/bugs/browse/JDK-8016579 http://bugs.sun.com/view_bug.do?bug_id=8016579 Here is the suggested fix: http://cr.openjdk.java.net/~uta/openjdk-webrevs/JDK-8016579/webrev.00/ Summary: We have THREE locales in action: 1. Thread default locale - dictates

Re: Review request: JDK-8016579 (process) IOException thrown by ProcessBuilder.start() method is incorrectly encoded

2013-07-15 Thread Dan Xu
I guess Alexey made the changes based on the existing implementation of JVM_GetLastErrorString() in hotspot, which is os::lasterror(char* buf, size_t len) in os_windows.cpp. One comment about the code at line 105 in win32Error(). 105 const int errnum = GetLastError(); Since in