J2SE Version (please include all output from java -version flag):
Does this problem occur on J2SE 6ux or 7ux? Yes / No (pick one)
Operating System Configuration Information (be specific):
Mac OSX 10.8
the charset encoding behavior has changed form Java 1.6.33 to 1.7.6
concerning the list files method.
Following test case:
* OSX 10.8 default installation
* Java installation that came from Apple
* Current developer release of Java 1.7
* Folder with files or folders containing special characters like umlauts,
Chinese or the Apple-Symbol
* Run the File.listfiles method against this folder with version 1.6 to
see all the files
* Run the File.listfiles method against this folder with version 1.7 to
only see files without special character
When debugging into listfiles -> File.list -> UnixFilesystem -> String.getBytes,
the charsetName argument is different in version 1.6.33 (utf-8) to
version 1.7 (US-ASCII).
It's very suspicious that we cannot find out where the UTF-8 comes from
while it is the correct behavior.
The only workaround is to set the environment variable LANG to en_US.UTF-8
the system having trouble with is a brand new installation of OSX Mountain Lion - no upgrade. Double-checked using the Guest Account which gets cleared every time you lock out. The settings have all been the default settings. Please find two screenshots attached(image001), showing the different output.
The Language Settings in the System Prefs are: English with a "UK (German)" Locale (however this does not have any impact).
The bug is not the different setting of file.encoding. The bug is that a
change of file.encoding has an effect on file names. The file.encoding
described the encoding inside the files and not the file names.
(See Inet-test.png) screenshot
This bug has the effect that files with Umlauts are not visible in the JFileChooser. See this screenshot (JFileChooser on the left, Finder on the right). Note the missing "test��.rb" and "pdfc��hm��.pdf" files. check FileEncodingChange.png