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

Can not change the default encoding for InputStreamReader

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.2.0
    • core-libs



      Name: tb29552 Date: 06/15/99


      I change the default encoding :

      java -Dfile.encoding=Big5 myclass

      But it has no effect on InputStreamReader()
      For example,

      System.out.println(System.getProperty("file.encoding"));
      InputStreamReader in=new InputStreamReader(System.in);
      System.out.println(in.getEncoding());

      It prints out:

      Big5
      MS950

      my version is:
      java version "1.2"
      HotSpot VM (1.0fcs, mixed mode, build E)
      (Review ID: 84171)
      ======================================================================

            ilittlesunw Ian Little (Inactive)
            tbell Tim Bell
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: