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

IOException thrown by RandomAccessFile() doesn't output Japanese characters

XMLWordPrintable

    • 1.1fcs
    • generic
    • generic
    • Not verified

      masayoshi.okutsu@Eng 1996-12-20
      Note that this bug description includes characters in EUCJIS (aka eucJP).

      IOException thrown by RandomAccessFile() doesn't output Japanese
      characters.

      When the given file name to RandomAccessFile() includes Japanese (Han)
      characters, IOException outputs an unreadable filename or "?"'s if file
      does not exist.

      %java test
      java.io.IOException: Ñãхѐ
      java.io.IOException: xxx
      java.io.IOException: ??????


      Source program:

      import java.io.* ;
      public class test{
      public static void main(String xx[]){
      try{
      RandomAccessFile RAF = new RandomAccessFile("\u30c6\u30b9\u30c8","r");
      }catch(Exception e){
      IOException i = new IOException ("\u30c6\u30b9\u30c8") ;
      System.out.println(i) ;
      }
      try{
      RandomAccessFile RAF = new RandomAccessFile("xxx","r");
      }catch(IOException e){
      System.out.println(e) ;
      }
      try{
      RandomAccessFile RAF = new RandomAccessFile("\u30c6\u30b9\u30c8","r");
      }catch(Exception e){
      System.out.println(e) ;
      }
      }

            sliangsunw Sheng Liang (Inactive)
            okutsu Masayoshi Okutsu
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: