Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7901511

Wrong encoding of JMH output in IDEA console on Windows

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • None
    • None
    • 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.

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

              Created:
              Updated:
              Resolved: