Re: Codereview request for 4153167: separate between ANSI and OEM code pages on Windows

2012-02-16 Thread Alan Bateman
On 16/02/2012 20:18, Xueming Shen wrote: Thanks Alan, webrev has been updated accordingly. http://cr.openjdk.java.net/~sherman/4153167/webrev -Sherman This looks reasonable to me, will be interesting to see if anyone notices. -Alan.

Re: Codereview request for 4153167: separate between ANSI and OEM code pages on Windows

2012-02-16 Thread Xueming Shen
Thanks Alan, webrev has been updated accordingly. http://cr.openjdk.java.net/~sherman/4153167/webrev -Sherman On 02/15/2012 07:00 AM, Alan Bateman wrote: On 13/02/2012 17:36, Xueming Shen wrote: : The webrev is at http://cr.openjdk.

Re: Codereview request for 4153167: separate between ANSI and OEM code pages on Windows

2012-02-15 Thread Alan Bateman
On 13/02/2012 17:36, Xueming Shen wrote: : The webrev is at http://cr.openjdk.java.net/~sherman/4153167/webrev The changes look reasonable to me and looks like you have all the combinations of redirection covered. I'm not sure about the sun.std*.encoding properties as folks will find them.

Re: Codereview request for 4153167: separate between ANSI and OEM code pages on Windows

2012-02-13 Thread Ulf Zibis
On 2/13/2012 11:07 AM, Bill Shannon wrote: Can you detect the case of creating an InputStreamReader using the default encoding, wrapped around the InputStream from System.in that refers to the console? If so, it might be good to handle that case as well, although at this point I would conside

Re: Codereview request for 4153167: separate between ANSI and OEM code pages on Windows

2012-02-13 Thread Ulf Zibis
Sherman, thanks for your additional explanation. One nit more... Why you use the "sun." prefix? I think, "stdout.encoding" "stderr.encoding" would be enough + nicer. In some years, nobody will have any association with 'sun'. On the other hand, it would be more true to use: "windows

Re: Codereview request for 4153167: separate between ANSI and OEM code pages on Windows

2012-02-13 Thread Xueming Shen
On 2/13/2012 11:07 AM, Bill Shannon wrote: Thanks for fixing this! The webrev is at http://cr.openjdk.java.net/~sherman/4153167/webrev You probably don't need to malloc 64 bytes for a string that's going to be less than 16 bytes. And shouldn't you use snprintf in any event? Unlike Unix,

Re: Codereview request for 4153167: separate between ANSI and OEM code pages on Windows

2012-02-13 Thread Xueming Shen
To have separate sun.stdout.encoding and sun.stderr.encoding is mainly because of implementation convenience. I need three things from the native (1) is std.out tty (2) is std.err tty (3) the console encoding if (1) or (2) are true, and I tried to avoid to go down to native multiple times it a

Re: Codereview request for 4153167: separate between ANSI and OEM code pages on Windows

2012-02-13 Thread Ulf Zibis
Am 13.02.2012 19:35, schrieb Xueming Shen: On 2/13/2012 10:15 AM, Ulf Zibis wrote: Interesting issue, especially for us germans! What is about System.in, if one types some umlaute at Windows console? System.in is a "InputStream", no charset involved there, you build your own "reader" on to

Re: Codereview request for 4153167: separate between ANSI and OEM code pages on Windows

2012-02-13 Thread Bill Shannon
Thanks for fixing this! The webrev is at http://cr.openjdk.java.net/~sherman/4153167/webrev You probably don't need to malloc 64 bytes for a string that's going to be less than 16 bytes. And shouldn't you use snprintf in any event? Unlike Unix, I assume Windows has no way to have multiple "

Re: Codereview request for 4153167: separate between ANSI and OEM code pages on Windows

2012-02-13 Thread Xueming Shen
On 2/13/2012 10:15 AM, Ulf Zibis wrote: Interesting issue, especially for us germans! What is about System.in, if one types some umlaute at Windows console? System.in is a "InputStream", no charset involved there, you build your own "reader" on top of that yourself. Why are there theo

Re: Codereview request for 4153167: separate between ANSI and OEM code pages on Windows

2012-02-13 Thread Ulf Zibis
Interesting issue, especially for us germans! What is about System.in, if one types some umlaute at Windows console? Why are there theoretically different code pages for stdout and stderr? -Ulf Am 13.02.2012 18:36, schrieb Xueming Shen: Hi This is a long standing Windows codepage support is

Codereview request for 4153167: separate between ANSI and OEM code pages on Windows

2012-02-13 Thread Xueming Shen
Hi This is a long standing Windows codepage support issue on Java platform (we probably have 20 bug/rfes filed for this particular issue and closed as the dup of 4153167). Windows supports two sets of codepages, ANSI (Windows) codepage and OEM (IBM) codepage. Windows uses ANSI/Windows codepa