File.exists() does not recognize directories/files in ISO-8859

XMLWordPrintable

    • Type: Bug
    • Resolution: Not an Issue
    • Priority: P2
    • None
    • Affects Version/s: 2.0
    • Component/s: core-libs
    • sparc
    • solaris

      JFileChooser does not select directories/files in European language. Please see the attached test java class.

      On Solaris machines, we could set this env first
      %setenv LANG iso_8859_1
      or %setenv LC_ALL iso-8859-1

      then run
      %java TestFilePath

      It shows
      ./ ../ Gef?hl Länder/

      Here is the question, is there any way I could set Locale in the application so JFileChooser could display European language directories and files?

      If no, how to set env Locale on windows and mac?

      We prefer to get it done in application instead of letting users set env.

      THanks,

      Jun


      ========================================================

      Here is a simple test case which shows the limitation when running in a C locale on Unix.

      import java.io.*;

      public class LS {
          public static void main(String[] args) throws Exception {
              File[] files = new File(".").listFiles();
              for (File f : files) {
                  System.out.print(f.getName());
                  if (!f.exists()) {
                      System.out.print("\t[File not found!]");
                  }
                  System.out.println();
              }
          }
      }

            Assignee:
            Iris Clark
            Reporter:
            J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: