JDK-7193966 : [macosx] [regresison from Apple's Java 6] non-ascii chars can not be read or displayed, causing files to not load, files not found
  • Type: Bug
  • Component: deploy
  • Sub-Component: deployment_toolkit
  • Affected Version: 7u6
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: os_x
  • CPU: x86
  • Submitted: 2012-08-24
  • Updated: 2013-04-01
  • Resolved: 2012-09-19
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 JDK 8
7u10Fixed 8 b57Fixed
Related Reports
Relates :  
Relates :  
Description
A user reported the following:
"https://www.elsteronline.de/eportal/KonfigurationsAssistent.tax?schritt=3&jre=1.
Elster Online is a tax site which is using a software certificate. The certificate is stored in a file on the Mac and you open it via the applet. If there is an umlaut in the name of the certificate the applet will not see the file. Older Java versions supplied by Apple do not have this problem."

User agent string: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:14.0) Gecko/20100101 Firefox/14.0.1

Comments
Not reproduced with 7u21 b09
01-04-2013

I have verified that the above JNLP testcase now works with: java version "1.7.0_10" Java(TM) SE Runtime Environment (build 1.7.0_10-b18) Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode) The file can be seen by the File Chooser and opens without issue. This bug has been fixed in 7u10, 7u11 and 7u12+
03-12-2012

This is a regression from Apple's Java 6. non-ascii chars are not displayed, read or displayed incorrectly. Causing application failure. This is a serious regression from Apple's Java and will cause users at large not use Oracle's Java 7 and go back to using Apple's Java. Example: Java applications with GUI on Mac can not handle non-ASCII characters. Swing applications can not 'see' or display characters and thus breaking the app. http://docs.oracle.com/javase/tutorial/uiswing/components/filechooser.html For example: You have a file with a non ascii character: nonAscii_��.txt Launch the JFileChooser to select the file, the file does not even appear: Oracle's Java 7u9, fails to see a file with �� in the file name. See attached image: Java7-nonascii-fail.png The same test works perfectly on Java 6 on Mac: MacBook:nonascii Jduke$ /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Commands/javaws JWSFileChooserDemo.jnlp See attached image: apple_Java_6_non-ascii-success.png proof the nonAscii_��.txt file is in the directory: > macbook:nonascii Jduke$ pwd > /Users/Jduke/tmp/nonascii > macbook:nonascii Jduke$ ls -al > total 8 > drwxr-xr-x 3 Jduke staff 102B Nov 7 13:11 ./ > drwxr-xr-x 25 Jduke staff 850B Nov 7 13:11 ../ > -rw-r--r-- 1 Jduke staff 15K Nov 7 13:25 JWSFileChooserDemo.jar > -rw------- 1 Jduke staff 2.4K Nov 7 13:26 JWSFileChooserDemo.jnlp > -rw-r--r-- 1 Jduke staff 522B Nov 7 13:04 nonAscii_��.txt > -rw-r--r-- 1 Jduke staff 20B Nov 7 13:13 testfile.txt
08-11-2012

7u10 b08 was not tested by SQE.
07-11-2012

Would like to get an SQE OK here if any 7u10 fix is to be considered. The origininal fix make old 7u10b08 which has been tested by QA already AFAIK.
06-11-2012

When java applet launched by the plugin the LC_CTYPE variable should be set to 'UTF-8' otherwise system libraries we are linked against will return gibberish instead of the real letters on all the operations where we have non-ASCII characters. Hence JFileChooser gets the file listing where instead of the correct file name (like T��r.pfx) we get wrong name (T?r.pfx). Then JFileChooser double-checks if file is accessible (it is not - there no such file as T?r.pfx) and because there is no such file it does not display it in the file view.
25-10-2012

To reproduce: - Use Firefox. The web site doesn't support Safari. - Go to <https://www.elsteronline.de/eportal/> - You should see "Bitte w��hlen Sie Ihr Sicherheitsverfahren aus:" - Click 'Software-Zertifikat' - Click Login An applet will load. - Page should change to say 'Login mit Software-Zertifikat'. - Click 'Durchsuchen...'. This opens up a file dialog. At this point I don't have any .p12 files to open, but based on the description this is what the bug is about. If the file has an umlaut it won't open.
25-10-2012

EVALUATION Alexander's suggestion is correct. Set LC_CTYPE to UTF-8 when launching the client process and we're all set.
12-09-2012