Uploaded image for project: 'Aesh'
  1. Aesh
  2. AESH-436

Windows, character encoding issue in the terminal

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.0.0.Alpha1
    • None
    • None
    • None

      On windows, the text MüllerMaßen is wrongly displayed in the terminal.
      That is caused by the 2 layers of encoding tha does exist in Windows world:
      1) The JVM encoding (the default encoding)
      2) The cmd.exe encoding.
      If these 2 mismatches, then we can end with some characters being wrongly encoded when using the default JVM encoding.

      Aesh, WindowsTerminal creates a PrintStream that wraps System.out and rely on the default platform (generally windows-1252) for its encoding. Then the int are sent to System.out.

      The hidden property "sun.output.encoding" contains the console encoding to use, if not null, its value could be used when creating the PrintStream.

              spederse@redhat.com Stale Pedersen
              jdenise@redhat.com Jean Francois Denise
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: