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.
I'm not sure this is related to http://www.netbeans.org/issues/show_bug.cgi?id=71978, but the title of Javadoc of JDK1.5 JA is garbled in menu "View"->"Documentation Indices". 1. Download JDK1.5 JA javadoc from http://java.sun.com/j2se/1.5.0/download.jsp 2. Add the javadoc on Java Platform Manager 3. See View -> Documentation Indices menu I tried this on Windows XP. When I tried English javadoc, it shows "Java2 Platform SE 5.0".
Created attachment 28630 [details] menu is garbled
Sorry, I do not speak Japanese. What is wrong with the name? It is taken from jar:file:///jdk-1_5_0-doc-ja.zip!/docs/ja/api/overview-frame.html.
Created attachment 28672 [details] English javadoc source and Japanese
Thank you for the info. I checked the HTML file and I attached the snapshot that shows correct Japanese, which is Japanese translation of "Overview". "overview-frame.html" is using euc-jp as encoding but which encoding is using in NetBeans to get the title?
NetBeans are using a default charset of the Java virtual machine. See menu Help/About and Detail/System locale. The javadoc module will have to look for the encoding of each html file before parsing the title.
Created attachment 29126 [details] example path : use jdocRegs.getDocEncoding() to get javadoc encoding before parsing title.
fixed in /cvs/javadoc/src/org/netbeans/modules/javadoc/search/IndexBuilder.java new revision: 1.13; previous revision: 1.12 Please verify if the Japanese is displayed properly. Do you think it is worthy to merge this to the release55 branch?
When i add to platform mgr the ja javadoc zip, then create java project, console msg says t cant open the zip - so i think that is why for me the view menu for documentation is empty - are there other steps needed, like to unzip the javadoc first ? ken.frank@sun.com
No, this is the proper way how to add javadoc. There has to be something wrong with your zip file like insufficient access permissions or broken content. Any exception in your var/log?
combination of inaccurate download and then not chmod +x the zip - now the mbyte looks ok at least on solaris ja locale, as to in view menu and in browser. We should wait for Masaki's feedback before its closed. ken.frank@sun.com
Hi Jan, Thank you very mush for working on it. But it's not working for me. It seems that there are two issues. 1. super(DTD.getDTD("html32")) If I used "html32" as DTD, it seems that handleStartTag() is never called for META tag. So "encoding" is always null. When I changed this to "html40", it started working. 2. Reader r = new BufferedReader(new InputStreamReader(html.getInputStream())); The Reader is using the native encoding. If encoding is not the same with Javadoc, the title string (in handleTitle()) is corrupted at reading. Is there any reason not using jdocRegs.getDocEncoding()? Getting encoding and Getting title need to be separated. I think after getting encoding, Reader needs to be opened with the encoding to get title.
ad 1) super(DTD.getDTD("html32")) is correct since html32.bdtd exists in rt.jar. For htm40 there is no such file. META tag is definitely part of HTML 3.2. See http://www.w3.org/TR/REC-html32#meta. BTW JavadocRegistry.getEncoding uses DTD.getDTD("html32") too. ad 2) I know about default charset so there is title = new String(this.title.getBytes(), encoding); this should work for 8-bit encodings as euc-jp. The reason for not using jdocRegs.getDocEncoding() is the performance. I do not want to run 2 parsers. The menu has to be responsive. IMO it is a bug of javax.swing.text.html.parser.Parser. It should take InputStream to parse the file and decode according to specified charset. I will try to write own simple parser.
fixed in /cvs/javadoc/src/org/netbeans/modules/javadoc/search/IndexBuilder.java new revision: 1.14; previous revision: 1.13 I have tested with charsets euc-jp(jdk1.5), iso-2022-jp(jdk1.4)
The patch seems good.
Verified in NB6.0(euc-jp). The patch is ok from qa side.. ------ Product Version = NetBeans IDE Dev (Build 200606111800) Operating System = Linux version 2.6.11.11 running on i386 Java; VM; Vendor; Home = 1.5.0_06; Java HotSpot(TM) Client VM 1.5.0_06-b05; Sun Microsystems Inc.; /usr/java/jdk1.5.0_06/jre System Locale; Encoding = ja_JP (nb); EUC-JP-LINUX
merged to release55 /cvs/javadoc/src/org/netbeans/modules/javadoc/search/IndexBuilder.java new revision: 1.12.26.2; previous revision: 1.12
Max, where is nb6 is the view->documentation indexes menu ? I want to verify it. ken.frank@sun.com
AFAIK we don't have this menu anymore. But the above metioned simple parser has been added, so I guess we can close this issue.
Based on Max's comments, am verifying and closing this since the menu is not present anymore. ken.frank@sun.com
From NetBeans 5.5 release, this menu has been moved to Help menu (Help > Javadoc References). I verified this works properly on NetBeans 6.0 200705291800 with both JDK1.5 and JDK6 Japanese javadocs.