JDK-4137321 : i18n: javadoc should generate META charset tag for cross-platform viewing
  • Type: Enhancement
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 1.1.3
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_nt
  • CPU: x86
  • Submitted: 1998-05-12
  • 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 :  
Relates :  
Description
The customer is developing a PlugIn for Java WorkShop 2.0, 
including a Japanese on-line doc for the PlugIn.
The customer complains that javadoc-generated document cannot be viewed
using JWS 2.0 on-line viewer.  This is because the customer
writes the Java code on PC in Shift-JIS encoding, ran javadoc
on PC, and the generated .html file does not have an encoding
announcement embedded, and JWS's help browser defaults to EUC (because
the help files supplied by Sun is in EUC, the Solaris's standard).
This weren't be a problem if javadoc generates an encoding announcement, i.e.,

    <META HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=Shift_JIS">

or

    <META HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=EUC-JP">

depending on the encoding of the platform where javadoc is run,
in between <HEAD> and </HEAD>.  The charset name to be used must
be taken from the IANA registry, not those of Java encoding names
(I.e., use EUC-JP instad of EUCJIS).


Japan Software Center would also like this feature.  Not having this feature,
we had to write a script to insert the META tag to the generated files,
complicating the build process.


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

EVALUATION I have few questions about IANA registry. -Atuld@eng Asked Laura Werner if this is a duplicate of her bug 4197265 doug.kramer@Eng 1998-12-19 Added Laura's reply to "Comments" doug.kramer@Eng 1999-01-13
11-06-2004

PUBLIC COMMENTS .html files that is generated by javadoc does not have a META charset tag. Because of this, the generated .html file could be displayed as garbage when the default charset of the browser does not agree with the charset used to write the original .java file and to run javadoc. When this happens, the user should manually change the charset of the browser.
10-06-2004

SUGGESTED FIX Probably the right solution is to support the following method to sun.io.CharacterEncoding. /** * Returns an IANA encoding name of the given Java converter name * or null if no IANA name is found. */ public static String getIANAEncodingName(String javaConverterName) And add Java converter names to the alias table because aliasName() returns null for a Java converter name. String ianaName = CharacterEncoding.getIANAEncodingName( CharacterEncoding.aliasName(encoding)); will give the IANA name of `encoding'. masayoshi.okutsu@Eng 1998-07-02
02-07-1998

WORK AROUND Support JISAutoDetect in the help browser. masayoshi.okutsu@Eng 1998-07-02
02-07-1998