JDK-4197265 : Javadoc does not include CHARSET tags in generated HTML
  • Type: Bug
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 1.2.0
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 1998-12-14
  • Updated: 2014-05-05
  • Resolved: 1999-01-11
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 :  
Description

Name: bb33257			Date: 12/14/98


Javadoc currently does not include a "charset" tag in the pages
it generates.  Apparently it was thought that doing so would
interfere with the process of translating the JDK docs into
Japanese and other languages.

This is wrong.  If Web browsers don't see the "charset" tag, they
typically assume either ISO 8859-1 or the current default code
page, e.g. SJIS on a Japanese system.  Whenever you're generating
a web page that contains non-ASCII characters and that you expect
to be viewed by people from multiple countries, it should specify
the charset so that browsers will display it properly even if
their default is set to something else.

If pages containing "charset" tags were translated into Japanese
(say into SJIS) and the tags were left alone (so they still said 
iso-8859-1), there would indeed be a mismatch.  The translators
will have to change the "charset" tag to whatever character set
they used.  But they should be doing this anyway.  If they're
not, they're essentially assuming that anyone who wants to see
the pages has their browser's default codepage set to SJIS (or
whatever), which is not always going to be the case.  For
example, I occasionally look at Japanese pages even though my
browser's default is 8859-1.  Additionally, some Japanese users
have their default set to 8859-1 so that they can view the huge
number of pages out on the Web that just assume 8859-1.
======================================================================

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

WORK AROUND Name: bb33257 Date: 12/14/98 Insert a line like this in the <head> section of every HTML file: <META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> ======================================================================
11-06-2004

SUGGESTED FIX Suggest creating a new option -charset that takes one argument and operates as follows: javadoc -charset XXX mypackage would insert this line at the top of every generated page: <META http-equiv="Content-Type" content="text/html; charset=XXX"> This is described in the HTML standard at: http://www.w3.org/TR/REC-html40/charset.html#h-5.2.2 Please insert this tag immediately after the <HEAD> tag but before the <TITLE> tag: <!DOCTYPE...> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc on ... --> <META http-equiv="Content-Type" content="text/html; charset=XXX"> <TITLE> ...
11-06-2004

EVALUATION Added a new option to the suggested fix field. doug.kramer@Eng 1998-12-14 This may be a dupe of 4197265. If so, close out this one. doug.kramer@Eng 1998-12-19
14-12-1998