-
Bug
-
Resolution: Not an Issue
-
P2
-
None
-
2.0
-
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();
}
}
}
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();
}
}
}
- relates to
-
JDK-4163515 -Dfile.encoding option doesn't affect default ByteToChar converter
- Closed