[ http://jira.codehaus.org/browse/MNG-1409?page=comments#action_50466 ] 

Michael Schnake commented on MNG-1409:
--------------------------------------

While trying to get meaningful results building a (default, that is no own apt 
etc. files) site in german the current (= maven2 build from SVN) situation 
seems to be that it is impossible right now. My default file.encoding is UTF-8. 
I have maven-site-plugin configured with <outputEncoding>UTF-8</outputEncoding>.

The situation "out of the box" with regard to the german umlauts for the 
generated side is:
=> Result: site content has garbage, site navigator is correct, organization 
name (from pom.xlm) in copyright statement is correct.

1. Despite the statement at 
http://maven.apache.org/plugins/maven-site-plugin/i18n.html all Java 
.properties files must be encoded "ISO-8859-1 with unicode escapes as needed" 
(as defined by the Java API and already stated above). So I converted 
site-plugin_de.properties from UTF-8 to ISO-8859-1.
=> Result: Site content is correct, site navigator has garbage, organization 
name is correct.

2. Well, the component building the site navigator seems to (incorrectly, or at 
least "non Property API-Doc conforming") read site-plugin_de.properties using 
my platform default encoding (= UTF-8). So I called "mvn site" with 
MAVEN_OPTS="-Dfile.encoding=ISO-8859-1".
=> Result: Site content is correct, site navigator is correct, organization 
name has garbage.

So, now the organziation name has garbage, although it comes from my pom.xlm 
which explicitly states <?xml version="1.0" encoding="UTF-8"?>. But the parser 
reading the organization name from there seems to ignore that and uses the 
platform encoding (= ISO-8859-1 in the step above) instead.

The net result is that you currently have to sacrifice one of site [content | 
navigator | copyright]. But, hey, two out of three is not that bad ;-) Note 
that the previous comments for this bug already seem to explain (and probably 
fix) that behaviour. But perhaps this comment helps those struggling with site 
i18n until this is fixed.

> Various encoding problems with InputStream and XML
> --------------------------------------------------
>
>          Key: MNG-1409
>          URL: http://jira.codehaus.org/browse/MNG-1409
>      Project: Maven 2
>         Type: Bug
>   Components: maven-site-plugin
>     Reporter: Naoki Nose
>  Attachments: plexus-i18n.diff, plexus-site-renderer.diff, plexus-utils.diff, 
> plexus-utils_2.diff
>
>
> There is various encoding problems with InputStream and XML in different 
> components.
> - Property resource file is encoded with UTF-8 , but Java reads bundle with 
> UTF-8.
> - In different components Reader is constructed with default system encoding.
> - MXParser ignores encoding attribute in xml declaration.

-- 
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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to