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

Unable to set encoding for IO.println, IO.print and IO.readln

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 24
    • None
    • core-libs
    • None
    • b22

      Following simple program renders with incorrect encoding on a Windows system with cp1250 native encoding:

      ```
      void main() {
          println("Ahoj svÄ›te");
      }
      ```

      All my attempts to enforce a different encoding to the JVM failed.

      In comparison `System.out.println` also renders with wrong encoding by default, however it is fixable by `stdout.encoding` property override.

      The root cause of the encodings discrepancy on the particular Windows system is unclear, however an option to override default encoding for IO is painfully missing.

            naoto Naoto Sato
            asotona Adam Sotona
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: