JDK-4210341 : Javadoc -charset, default charset should not be iso-8859-1
  • Type: Bug
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 1.2.2
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 1999-02-10
  • Updated: 2014-05-05
  • Resolved: 1999-02-18
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.
Other
1.2.2 1.2.2Fixed
Related Reports
Relates :  
Relates :  
Description
By fixing 4197265, 4137321, now javadoc (standard doclet) accept new option '-charset' to specify output HTML encoding.

However, if the user does not specify this option, the default charset tag inserted in HTML file is always 'iso-8859-1'. On Japanese system, the wrong charset META tag confuses the browser and cannot display Japanese at all. This might be also true to Korean, Chinese.

If the user does not specify this option, the default is 'not include META tag.' Including wrong charaset is worse than nothing.
 
[koushi.takahashi@japan 1999-02-10]

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: 1.2.2 FIXED IN: 1.2.2 INTEGRATED IN: 1.2.2
14-06-2004

PUBLIC COMMENTS Now, the default value for the charset is "" instead of "iso-8859-1" as suggested in the fix. And if user doesen't use -charset option, the META tag statement is not generated. atul.dambalkar@eng 1999-02-18
18-02-1999

SUGGESTED FIX Suggested fix here, unless the user does not specify -charset option, javadoc won't submit META charset tag. *** /tmp/geta4469 Tue Feb 16 14:17:03 1999 --- ConfigurationStandard.java Tue Feb 16 14:17:20 1999 *************** *** 133,142 **** public boolean serialwarn = false; /** ! * The META charset tag used for cross-platform viewing. The default ! * value is "iso-8859-1". */ ! public String charset = "iso-8859-1"; /** * Unique Resource Handler for this package. --- 133,143 ---- public boolean serialwarn = false; /** ! * The META charset tag used for cross-platform viewing. ! * Unless the user specifies the value, META charset tag is not emitted. ! * Since wrong META charset tag confuse the browser. */ ! public String charset = null; /** * Unique Resource Handler for this package. *** /tmp/geta4479 Tue Feb 16 14:18:03 1999 --- HtmlStandardWriter.java Tue Feb 16 14:08:53 1999 *************** *** 228,235 **** print("<!-- Generated by javadoc on "); print(today()); println(" -->"); ! println("<META http-equiv=\"Content-Type\" content=\"text/html; " + ! "charset=" + Standard.configuration().charset + "\">"); title(); println(title); titleEnd(); --- 228,237 ---- print("<!-- Generated by javadoc on "); print(today()); println(" -->"); ! if(Standard.configuration().charset != null) { ! println("<META http-equiv=\"Content-Type\" content=\"text/html; " + ! "charset=" + Standard.configuration().charset + "\">"); ! } title(); println(title); titleEnd(); [koushi.takahashi@japan 1999-02-16]
16-02-1999

WORK AROUND Ask user (non Latin user) always use '-charset' option specifing desired IANA charset entry. [koushi.takahashi@japan 1999-02-10]
10-02-1999

EVALUATION I will look into this. atul.dambalkar@eng 1999-02-10 This is a regression bug. cindy.jao@eng 1999-02-18
10-02-1999