-
Bug
-
Resolution: Fixed
-
P3
-
9
-
None
-
b18
The standard doclet provides two options and two internal settings for what ought to be a single concept.
-docencoding is defined to be the actual encoding used to write an output file.
See BaseConfiguration line 201, 491,
See StandardDocFileFactory line 208
-charset is defined to be the declared charset written into an HTML META tag.
See HtmlConfiguration line 147, 547
See uses of "charset" in HtmlDocWriter, HtmlDocletWriter, IndexRedirectWriter
The actual value for the charset written into HTML files should directly correspond to the docencoding. It is wrong to allow them to be specified independently and differently.
I suggest the following:
* keep docencoding option and variable
* keep charset option for compatibility, but ensure it is not set differently from docencoding. (This raises minor design issues of, what if only one is specified; that needs discussion)
* ensure that in HTML files, we always write a META tag for Charset, but the value should be the name of the docencoding being used.
* ensure that the default file encoding, if no options are specified , is UTF-8.
Proposed test cases:
No options given: output file should in be UTF-8, and should contain meta tag for charset for UTF-8
One option given: output should be in specified format ... ISO-8859-1 is a good alternative to UTF-8
Two options given with same value: : output should be in specified format ... ISO-8859-1 is a good alternative to UTF-8
Two options given with different values: error
-docencoding is defined to be the actual encoding used to write an output file.
See BaseConfiguration line 201, 491,
See StandardDocFileFactory line 208
-charset is defined to be the declared charset written into an HTML META tag.
See HtmlConfiguration line 147, 547
See uses of "charset" in HtmlDocWriter, HtmlDocletWriter, IndexRedirectWriter
The actual value for the charset written into HTML files should directly correspond to the docencoding. It is wrong to allow them to be specified independently and differently.
I suggest the following:
* keep docencoding option and variable
* keep charset option for compatibility, but ensure it is not set differently from docencoding. (This raises minor design issues of, what if only one is specified; that needs discussion)
* ensure that in HTML files, we always write a META tag for Charset, but the value should be the name of the docencoding being used.
* ensure that the default file encoding, if no options are specified , is UTF-8.
Proposed test cases:
No options given: output file should in be UTF-8, and should contain meta tag for charset for UTF-8
One option given: output should be in specified format ... ISO-8859-1 is a good alternative to UTF-8
Two options given with same value: : output should be in specified format ... ISO-8859-1 is a good alternative to UTF-8
Two options given with different values: error
- duplicates
-
JDK-4756688 stddoclet: Combine -docencoding and -charset options
-
- Closed
-
- relates to
-
JDK-8183508 multi_tsc.html should be updated
-
- Resolved
-
-
JDK-8183583 LSSerializer docs have invalid character
-
- Closed
-
-
JDK-8183611 Collator and CollationElementIterator have invalid characters in docs
-
- Closed
-