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

Java7 can not handle Japanese file name.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 7
    • core-libs
    • x86
    • os_x

      FULL PRODUCT VERSION :
      java version "1.7.0_04-ea"
      Java(TM) SE Runtime Environment (build 1.7.0_04-ea-b227)
      Java HotSpot(TM) 64-Bit Server VM (build 23.0-b12, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Mac OS X 10.7.2

      A DESCRIPTION OF THE PROBLEM :
      java.io.File class of Java7 can't handle a file with Japanese file name.



      REGRESSION. Last worked in version 7

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Execute the source code. The first argument is a directory name which contains Japanese file.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Shows list of "true:" and correct file names.
      ACTUAL -
      Shows list of "false:" and wrong file names.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      package test;

      import java.io.File;

      public class FileTest {
      public static void main(String[] args) {
      File[] files = new File(args[0]).listFiles();
      for(File file : files) {
      System.out.println(file.exists() + ":" + file.getName());
      }
      }
      }

      ---------- END SOURCE ----------

            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: