This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Cannot display local text in FileChooser -my local is zh_CN (P.R.China) -though the jdk5.0 support it -In current netbeans' builds cannot accurately display local text -in my opinion, though current netbeans wasn't localized, it can display local text. see the attachments, FileChooser demo comes with jdk5.0 does display accurately.
my system info: >System Info: Product Version = NetBeans IDE Dev (Build 200409291800) Operating System = Windows 2000 version 5.0 running on x86 Java; VM; Vendor = 1.5.0; Java HotSpot(TM) Client VM 1.5.0-b64; Sun Microsystems Inc. Java Home = C:\Program Files\Java\jdk1.5.0\jre System Locale; Encod. = zh_CN (nb); GBK Home Dir; Current Dir = C:\Documents and Settings\pprun; D:\netbeans-4.0dev\bin IDE Install; User Dir = D:\netbeans-4.0dev\platform4; C:\Documents and Settings\pprun\.netbeans\dev CLASSPATH = D:\netbeans-4.0dev\platform4\lib\boot.jar;C:\Program Files\Java\jdk1.5.0\lib\dt.jar;C:\Program Files\Java\jdk1.5.0\lib\tools.jar Boot & ext classpath = C:\Program Files\Java\jdk1.5.0\jre\lib\rt.jar;C:\Program Files\Java\jdk1.5.0\jre\lib\i18n.jar;C:\Program Files\Java\jdk1.5.0\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.5.0\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.5.0\jre\lib\jce.jar;C:\Program Files\Java\jdk1.5.0\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.5.0\jre\classes;C:\Program Files\Java\jdk1.5.0\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.5.0\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.5.0\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.5.0\jre\lib\ext\localedata.jar Dynamic classpath = D:\netbeans-4.0dev\platform4\core\core.jar;D:\netbeans-4.0dev\platform4\core\openide-loaders.jar;D:\netbeans-4.0dev\platform4\core\openide.jar;D:\netbeans-4.0dev\platform4\core\org-netbeans-swing-plaf.jar;D:\netbeans-4.0dev\platform4\core\updater.jar;D:\netbeans-4.0dev\nb4.0\core\org-netbeans-upgrade.jar;D:\netbeans-4.0dev\nb4.0\core\locale\core_nb.jar;D:\netbeans-4.0dev\ide4\core\org-netbeans-modules-utilities-cli.jar
Created attachment 18619 [details] demo of jdk1.5.0/demo/jfc/FileChooserDemo
Created attachment 18620 [details] snapshot of open file in netbeans
I noticed that two the sceenshots use a different Java look&feel (L&F). The screenshot taken from NetBeans presents filechooser using Windows L&F while the file chooser run from the demo presents a Metal L&F. It is possible to change L&F of the demo at runtime. When you run the demo, you can see several radio-buttons at the bottom of the demo window. Please do the following: 1) Select the Windows radio-button. (L&F of the window changes.) 2) Press the "Show FileChooser" button so that the file chooser dialog appears. Does it still display Chinese characters?
Thank you for your feedback. Changing to Windows L&F, the demo of jdk1.5.0/demo/jfc/FileChooserDemo cannot display chinese characters too.
Thank you. It seems the problem is not in the NetBeans code but rather it is a configuration problem of the JDK/JRE. NetBeans code does not affect how file names are displayed in the file chooser. You should be able to find a solution for this problem by searching Java related forums, articles and mailing lists. You may also ask for help on Java forums and/or mailing lists. As a starting point, go to http://forum.java.sun.com/index.jsp . Since the described bug is not a NetBeans bug and it is a configuration issue, I am marking it as INVALID.
Thanks. This is swing's winlaf bug.
Created attachment 19541 [details] still in JDK 1.5 update 1
Hi, NetBean team. The above attachment is just to jdk team, because bug system of jdk can not accept attachments. So I remember yours for help me communion with them. So you can simply ignore it, I'm sorry for my disturbing.
JDK bug: 5092815 - REGRESSION: Simplified chinese file name not displayed correctly in JFileChooser (see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5092815)
Thanks pzgyuanf for pointing to the JDK bug and the evaluation. I will try to reproduce the bug and contact the responsible people if necessary.
*** Issue 52176 has been marked as a duplicate of this issue. ***
Useing the same jdk - JDK 1.5 update 1, Netbeans4.1 dev build worked great. I found the difference in the messages.log files: NetBeans4.0: org.netbeans.swing.plaf [1.1.1 200412081800] NetBeans4.1 dev: org.netbeans.swing.plaf [1.2 200501121900] Please forgive me if I miss some other things. pprun
Thank you for the report. Could you please try NetBeans 4.1 dev with JDK 1.5 (no update)? Thanks.
I have some tests. see the attachments(screenshoots): (the later is better) Netbeans4.0 with jdk5.0 - nb4.0_jdk1.5.0.png Netbeans4.0 with jdk1.5.0_01 - nb4.0_jdk1.5.0_01.png Netbeans4.1 ea2 with jdk5.0 - nb4.1ea2_jdk1.5.png Netbeans4.1 ea2 with jdk1.5.0_01 - nb4.1ea2_jdk1.5.0_01.png
Created attachment 19872 [details] Netbeans4.0 with jdk5.0
Created attachment 19873 [details] Netbeans4.0 with jdk1.5.0_01
Created attachment 19874 [details] Netbeans4.1 ea2 with jdk1.5.0
Created attachment 19875 [details] Netbeans4.1 ea2 with jdk1.5.0_01
It seem that things have got better under the efforts of jdk team and netbeans team. hope it helps. pprun
just another trivial question - Everything work great when I set below parameter in netbeans.conf, why? nothing changed except setting '--fontsize 12' in in 'netbeans_default_options=' key. '--fontsize 11' is default value in Windows platform. pprun
Were all the four screenshots you posted today made with the same font size?
Yes, they are made with the same font size - default. I've spoken of the font size because I had to set the '--fontsize 12' with all other default settings or set the '--laf javax.swing.plaf.metal.MetalLookAndFeel' with all other default settings so that Netbeans 4.0 worked normally in open project dialog - FileChooser. best regard pprun
Reopening so that the resolution may be changed.
Final evaluation: This bug comprises of two bugs - a JDK bug 5092815 ("Simplified chinese file name not displayed correctly in JFileChooser") and a NetBeans bug #52233 which is essentially the same as bug #52178 ("Most of Japanese glyphs on IDE seem broken on windowsXP platform"). The JDK bug is fixed in JDK 1.5.0_01 and the NetBeans bug is fixed in NetBeans 4.1 (not yet released). Marking as FIXED. It should work both in the trunk and in the beta branch, too.
v/c