Encoding issues with '±' on Windows
Aleksey Shipilev
aleksey.shipilev at oracle.com
Thu Dec 18 18:41:03 UTC 2014
On 12/18/2014 05:42 PM, Aleksey Shipilev wrote:
> On 12/18/2014 03:53 PM, Matt Warren wrote:
>> When I run any JMH Benchmark within the Windows Console, the '±' is
>> replaced with a '▒'. This makes the benchmarks a bit confusing when you
>> first run them as '±' is used quite a bit.
>
> Thanks, I have reproduced this on my (dusty) Windows dev machine.
UTF support in Windows is still an abomination, I see.
> Filed:
> https://bugs.openjdk.java.net/browse/CODETOOLS-7901217
So, using System.console() directly is not an option for us, since we
also need to push the "already encoded" stdout/stderr from the forked
VM. After trying the alternatives, I can conclude that the one of the
least messier ways to deal with this is to poke the Charset out of
Console, and use it:
http://hg.openjdk.java.net/code-tools/jmh/rev/9453f3e72b6e
It works on my Linux/Windows machines well.
I would appreciate more testing ASAP.
Thanks,
-Aleksey.
More information about the jmh-dev
mailing list