Wrong encoding of JMH output in IDEA console on Windows

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • None
    • Affects Version/s: None
    • Component/s: tools
    • None
    • jmh
    • windows

      "?" signs are printed instead of "+-" and other non-ASCII symbols in IDEA console on Windows.

      Utils.guessConsoleEncoding() returns Cp866 extracted by a call to Console.encoding(). However no system console is used at all when JMH is run under IDEA (and probably other IDEs). When System.console() is null, that is, an application is not attached to a console, the actual charset of standard output should be extracted from System.out, not from System.console().

      The problem appeared after a fix to CODETOOLS-7901217.

      The suggested patch is attached.

            Assignee:
            Unassigned
            Reporter:
            Andrei Pangin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: