17 Feb
2012
17 Feb
'12
3:35 p.m.
On 16/02/2012 20:18, Xueming Shen wrote:
Thanks Alan, webrev has been updated accordingly.
http://cr.openjdk.java.net/~sherman/4153167/webrev <http://cr.openjdk.java.net/%7Esherman/4153167/webrev/>
Although it's in some sense safe in this case, you might get a grumble about introducing a new sprintf. +static char* getConsoleEncoding() +{ + char* buf = malloc(16); + int cp = GetConsoleCP(); + if (cp >= 874 && cp <= 950) + sprintf(buf, "ms%d", cp); + else + sprintf(buf, "cp%d", cp); + return buf; +} Tom