Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8277046

Incorrect default encoding for System.getLogger(..).log(..) console output

XMLWordPrintable

      ADDITIONAL SYSTEM INFORMATION :
      Microsoft Windows [version 10.0.19043.1348]
      OpenJDK Runtime Environment (build 18-ea+22-1416)
      Windows with French locale

      A DESCRIPTION OF THE PROBLEM :
      The default encoding for System.getLogger(..).log(..) console output is incorrect

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Copy the given program into src\main\java\mavenproject3\
      Compile the given program with javac src\main\java\mavenproject3\*.java
      Run with java -cp src\main\java mavenproject3.NewMain

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The program is expected to print (instant adjusted - e acute t e acute):
      été
      nov. 10, 2021 3:56:11 PM mavenproject3.NewMain main
      INFO: été
      ACTUAL -
      The program prints (instant adjusted):
      été
      nov. 10, 2021 3:56:11 PM mavenproject3.NewMain main
      INFO: ├®t├®

      ---------- BEGIN SOURCE ----------
      package mavenproject3;
      public class NewMain
      {
        public static void main(String[] args)
        {
          String msg = "été";
          System.out.println(msg);
          System.getLogger("Main").log(System.Logger.Level.INFO, msg);
        }
      }
      ---------- END SOURCE ----------

      FREQUENCY : always


            dfuchs Daniel Fuchs
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: