You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Steven Coco (JIRA)" <ji...@codehaus.org> on 2007/05/23 03:47:59 UTC
[jira] Reopened: (MJAVADOC-123) Encoding Error When Getting
project.name For JavaDoc -doctitle
[ http://jira.codehaus.org/browse/MJAVADOC-123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steven Coco reopened MJAVADOC-123:
----------------------------------
Yikes!
It would appear that my test case was in error and this is not an issue. However, it is a bug.
In the first test case I used the trade mark character, U+2122. That character does not appear in the ISO-8859-1 charset, so you might expect something weird to happen. However if you look carefully you see that the HTML file contains a 3-byte sequence: the UTF-8 encoding of that character.
I changed the test case to make it more clear. Now I used the registered trade mark symbol, U+00AE. This character does appear in the ISO-8859-1 charset; as well as in the UTF-8 charset, where it is used. But still, the HTML file winds up containing a munged byte sequence: the raw 2-byte UTF-8 encoding for that character: 0xC2 0xAE.
It is clear that the plugin is not reading the POM in its declared encoding: likely, it's reading in ISO-8859-1 instead of UTF-8.
No matter what charsets are used in the POM or for the JavaDoc plugin, the files must be read in their declared encoding and transcoded during processing. So as in the first case where the character does not appear in the target charset, then any agreed-upon behavior could be acceptable: character replacement or perhaps something else. But if the character is mappable in the target charset then it must make it through.
I will try to take a look at the sources.
> Encoding Error When Getting project.name For JavaDoc -doctitle
> --------------------------------------------------------------
>
> Key: MJAVADOC-123
> URL: http://jira.codehaus.org/browse/MJAVADOC-123
> Project: Maven 2.x Javadoc Plugin
> Issue Type: Bug
> Environment: Linux coco-laptop 2.6.20-15-generic #2 SMP Sun Apr 15 07:36:31 UTC 2007 i686 GNU/Linux
> Maven version: 2.0.6
> Reporter: Steven Coco
> Assignee: Vincent Siveton
> Fix For: 2.3
>
> Attachments: javadoc-encoding.tar.gz
>
>
> I have found an encoding handling error in JavaDoc generation.
> The POM for this project is in UTF-8 encoding. the project.name element contains the trade mark character, U+2122.
> When the JavaDoc plugin builds the documentation, the default HTML charset is used: ISO-8859-1.
> When viewing the JavaDoc pages, the trade mark character in the title has been munged: "â¢".
> At some location, the project name's text is being copied and ported to the JavaDoc tool in the wrong encoding.
> The attachment has a test case. Since it's very small, the javadoc has already been built there to prevent any unwanted encoding mismatches during transmission of the attachment. View the POM to see the trade mark character in the name. View target/site/apidocs/index.html to see the munged trade mark character. View the src/main/java/overview.html file to see the other content used for the API overview page.
> N.B.: In the attachment, all files are in UTF-8 encoding.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira