Community
Participate
Working Groups
In Eclipse 3.2M4. When javadoc hover is showed and javadoc information is created from DBCS javadoc html file, hover displays a broken DBCS string.
Created attachment 32403 [details] javadoc hover
Created attachment 32404 [details] original javadoc html file.
- is the contents in the Javadoc view wrong as well? - what's the encoding of your Java project(s)? - what's the encoding of your workspace?
(In reply to comment #3) > - is the contents in the Javadoc view wrong as well? yes. > - what's the encoding of your Java project(s)? default encoding(MS932). > - what's the encoding of your workspace? default encoding(MS932), and the encoding of javadoc html file is euc-jp. When my workspace's encoding is euc-jp, javadoc hover(view) works fine.
Per default we should use the URLConnection's encoding. IJavaElement.getAttachedJavadoc(...) Javadoc should be updated accordingly i.e. the encoding argument might be dropped.
What I could read in the html source code of the String page is that the encoding is "iso-2022-jp" and not "euc-jp". I am trying to get a way to retrieve this encoding from the url connection.
Sorry, the attached image was wrong. The correct URL is http://java.sun.com/j2se/1.5.0/ja/docs/ja/api/java/lang/String.html This page is written by euc-jp.
If the url connection's content encoding is not specified, we should use the encoding specified in the html source if any. If none, then the project's encoding might be a good guess.
Created attachment 32422 [details] Proposed fix
Created attachment 32423 [details] Patch for regression tests
I will release in HEAD to give you a chance to try the next nightly build. Please confirm then that it works as expected. I could get a different display here, but since I don't read Japanese, I cannot confirm that it works fine.
Fixed and released in HEAD. Please reopen if you can still reproduce it with the next nightly build.
Fixed.
thanks for fix. I import JDT/Core project from HEAD, and try it. it looks like problems were fixed.
Verified for 3.2 M5 using build I20060215-0010. (Trusting comment #14 entered by the reporter).