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.

Bug 50993 - Cannot display Chinese text in FileChooser
Summary: Cannot display Chinese text in FileChooser
Status: CLOSED FIXED
Alias: None
Product: utilities
Classification: Unclassified
Component: Open File (show other bugs)
Version: 4.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: Marian Petras
URL:
Keywords: I18N, JDK_SPECIFIC, UI
: 52176 (view as bug list)
Depends on: 52233
Blocks:
  Show dependency tree
 
Reported: 2004-10-30 09:08 UTC by pzgyuanf
Modified: 2011-06-09 09:51 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
demo of jdk1.5.0/demo/jfc/FileChooserDemo (13.36 KB, image/png)
2004-10-30 09:10 UTC, pzgyuanf
Details
snapshot of open file in netbeans (21.00 KB, image/png)
2004-10-30 09:11 UTC, pzgyuanf
Details
still in JDK 1.5 update 1 (14.72 KB, image/png)
2005-01-07 03:47 UTC, pzgyuanf
Details
Netbeans4.0 with jdk5.0 (15.97 KB, image/png)
2005-01-21 16:14 UTC, pzgyuanf
Details
Netbeans4.0 with jdk1.5.0_01 (16.00 KB, image/png)
2005-01-21 16:15 UTC, pzgyuanf
Details
Netbeans4.1 ea2 with jdk1.5.0 (16.98 KB, image/png)
2005-01-21 16:18 UTC, pzgyuanf
Details
Netbeans4.1 ea2 with jdk1.5.0_01 (17.24 KB, image/png)
2005-01-21 16:19 UTC, pzgyuanf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pzgyuanf 2004-10-30 09:08:47 UTC
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.
Comment 1 pzgyuanf 2004-10-30 09:09:38 UTC
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
Comment 2 pzgyuanf 2004-10-30 09:10:59 UTC
Created attachment 18619 [details]
demo of jdk1.5.0/demo/jfc/FileChooserDemo
Comment 3 pzgyuanf 2004-10-30 09:11:59 UTC
Created attachment 18620 [details]
snapshot of open file in netbeans
Comment 4 Marian Petras 2004-11-01 09:01:53 UTC
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?
Comment 5 pzgyuanf 2004-11-01 12:18:41 UTC
Thank you for your feedback.

Changing to Windows L&F, the demo of jdk1.5.0/demo/jfc/FileChooserDemo
cannot display chinese characters too.
Comment 6 Marian Petras 2004-11-01 13:50:48 UTC
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.
Comment 7 pzgyuanf 2004-11-01 14:39:21 UTC
Thanks.
This is swing's winlaf bug. 
Comment 8 pzgyuanf 2005-01-07 03:47:54 UTC
Created attachment 19541 [details]
still in JDK 1.5 update 1
Comment 9 pzgyuanf 2005-01-07 03:55:27 UTC
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.
Comment 10 Marian Petras 2005-01-18 11:19:30 UTC
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)

Comment 11 Marian Petras 2005-01-18 11:21:17 UTC
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.
Comment 12 Marian Petras 2005-01-21 12:21:54 UTC
*** Issue 52176 has been marked as a duplicate of this issue. ***
Comment 13 pzgyuanf 2005-01-21 13:25:41 UTC
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
Comment 14 Marian Petras 2005-01-21 14:29:57 UTC
Thank you for the report. Could you please try NetBeans 4.1 dev with
JDK 1.5 (no update)? Thanks.
Comment 15 pzgyuanf 2005-01-21 16:11:39 UTC
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
Comment 16 pzgyuanf 2005-01-21 16:14:00 UTC
Created attachment 19872 [details]
Netbeans4.0 with jdk5.0
Comment 17 pzgyuanf 2005-01-21 16:15:36 UTC
Created attachment 19873 [details]
Netbeans4.0 with jdk1.5.0_01
Comment 18 pzgyuanf 2005-01-21 16:18:12 UTC
Created attachment 19874 [details]
Netbeans4.1 ea2 with jdk1.5.0
Comment 19 pzgyuanf 2005-01-21 16:19:50 UTC
Created attachment 19875 [details]
Netbeans4.1 ea2 with jdk1.5.0_01
Comment 20 pzgyuanf 2005-01-21 16:23:58 UTC
It seem that things have got better under the efforts of jdk team and
netbeans team.

hope it helps.

pprun
Comment 21 pzgyuanf 2005-01-21 16:32:38 UTC
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
Comment 22 Marian Petras 2005-01-21 16:53:36 UTC
Were all the four screenshots you posted today made with the same font
size?
Comment 23 pzgyuanf 2005-01-22 03:29:31 UTC
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
Comment 24 Marian Petras 2005-02-23 11:29:04 UTC
Reopening so that the resolution may be changed.
Comment 25 Marian Petras 2005-02-23 11:32:08 UTC
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.
Comment 26 Marian Mirilovic 2011-06-09 09:51:19 UTC
v/c