You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Incze Lajos (JIRA)" <ji...@codehaus.org> on 2005/08/11 01:31:57 UTC

[jira] Created: (MNG-722) maven-site-plugin maven-site.vm contains wired encoding

maven-site-plugin maven-site.vm contains wired encoding
-------------------------------------------------------

         Key: MNG-722
         URL: http://jira.codehaus.org/browse/MNG-722
     Project: Maven 2
        Type: Bug
  Components: maven-plugins  
    Versions: 2.0-beta-1    
 Environment: all
 Reporter: Incze Lajos


maven-site-plugin maven-site.vm contains wired encoding:

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />

It probably needs a conf. parameter and changed to

<meta http-equiv="Content-Type" content="text/html; charset=$outputEncoding" />

-- 
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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-722) maven-site-plugin maven-site.vm contains wired encoding

Posted by "Incze Lajos (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-722?page=comments#action_44326 ] 

Incze Lajos commented on MNG-722:
---------------------------------

It works this way at the moment, but I'm sure that it is because of some
widely used environmental settings. Velocity, which renders this script
has two runtime properties that guide the encodings (in velocity.properties
file):

#----------------------------------------------------------------------------
# T E M P L A T E  E N C O D I N G
#----------------------------------------------------------------------------

input.encoding=ISO-8859-1
output.encoding=ISO-8859-1

The input.encoding is the encoding of the template files, the output
encoding is the encoding that velocity should use to render its output
stream.

The defaults are the above ones in the repository velocity-1.4.jar. 

> maven-site-plugin maven-site.vm contains wired encoding
> -------------------------------------------------------
>
>          Key: MNG-722
>          URL: http://jira.codehaus.org/browse/MNG-722
>      Project: Maven 2
>         Type: Bug
>   Components: maven-plugins
>     Versions: 2.0-beta-1
>  Environment: all
>     Reporter: Incze Lajos
>     Assignee: Vincent Siveton

>
>
> maven-site-plugin maven-site.vm contains wired encoding:
> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
> It probably needs a conf. parameter and changed to
> <meta http-equiv="Content-Type" content="text/html; charset=$outputEncoding" />

-- 
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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-722) maven-site-plugin maven-site.vm contains wired encoding

Posted by "Incze Lajos (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-722?page=comments#action_44277 ] 

Incze Lajos commented on MNG-722:
---------------------------------

The diagnosis OK, but the cure is bad. It basically depends on
the velocity settings what the output encoding will be. So, the
velocity properties should be adjusted to the required encoding, too.

> maven-site-plugin maven-site.vm contains wired encoding
> -------------------------------------------------------
>
>          Key: MNG-722
>          URL: http://jira.codehaus.org/browse/MNG-722
>      Project: Maven 2
>         Type: Bug
>   Components: maven-plugins
>     Versions: 2.0-beta-1
>  Environment: all
>     Reporter: Incze Lajos

>
>
> maven-site-plugin maven-site.vm contains wired encoding:
> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
> It probably needs a conf. parameter and changed to
> <meta http-equiv="Content-Type" content="text/html; charset=$outputEncoding" />

-- 
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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Updated: (MNG-722) maven-site-plugin maven-site.vm contains wired encoding

Posted by "Incze Lajos (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-722?page=all ]

Incze Lajos updated MNG-722:
----------------------------

    Attachment: patch.txt

FileWriter(...) -> OutputStreamWriter(FileOutputStream(...), outputEncoding)

Works for me. Tested with ISO-8859-1, UTF-8 outputEncoding and
without outputEncoding conf. param., which defaults to ISO-8859-1.

> maven-site-plugin maven-site.vm contains wired encoding
> -------------------------------------------------------
>
>          Key: MNG-722
>          URL: http://jira.codehaus.org/browse/MNG-722
>      Project: Maven 2
>         Type: Bug
>   Components: maven-plugins
>     Versions: 2.0-beta-1
>  Environment: all
>     Reporter: Incze Lajos
>     Assignee: Vincent Siveton
>  Attachments: patch.txt
>
>
> maven-site-plugin maven-site.vm contains wired encoding:
> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
> It probably needs a conf. parameter and changed to
> <meta http-equiv="Content-Type" content="text/html; charset=$outputEncoding" />

-- 
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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-722) maven-site-plugin maven-site.vm contains wired encoding

Posted by "Incze Lajos (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-722?page=comments#action_44500 ] 

Incze Lajos commented on MNG-722:
---------------------------------

OK. I've tracked down the problem. The velocity propery is involved only when it
is the template engine that creates the output writer. In this case it is the DoxiaMojo
that crates the output writer using the java.io.FileWriter which uses the platform
default encoding (nowadays it is mostly UTF-8).

So, every place, where DoxiaMojo uses
                                                new FileWriter(..)
this should be replaced by
               new OutputStreamWriter(new FileOutputStream(...), outputEncoding)

> maven-site-plugin maven-site.vm contains wired encoding
> -------------------------------------------------------
>
>          Key: MNG-722
>          URL: http://jira.codehaus.org/browse/MNG-722
>      Project: Maven 2
>         Type: Bug
>   Components: maven-plugins
>     Versions: 2.0-beta-1
>  Environment: all
>     Reporter: Incze Lajos
>     Assignee: Vincent Siveton

>
>
> maven-site-plugin maven-site.vm contains wired encoding:
> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
> It probably needs a conf. parameter and changed to
> <meta http-equiv="Content-Type" content="text/html; charset=$outputEncoding" />

-- 
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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Closed: (MNG-722) maven-site-plugin maven-site.vm contains wired encoding

Posted by "Vincent Siveton (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-722?page=all ]
     
Vincent Siveton closed MNG-722:
-------------------------------

     Resolution: Fixed
    Fix Version: 2.0-beta-1

Applied in SVN. Tx again.

> maven-site-plugin maven-site.vm contains wired encoding
> -------------------------------------------------------
>
>          Key: MNG-722
>          URL: http://jira.codehaus.org/browse/MNG-722
>      Project: Maven 2
>         Type: Bug
>   Components: maven-plugins
>     Versions: 2.0-beta-1
>  Environment: all
>     Reporter: Incze Lajos
>     Assignee: Vincent Siveton
>      Fix For: 2.0-beta-1
>  Attachments: patch.txt
>
>
> maven-site-plugin maven-site.vm contains wired encoding:
> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
> It probably needs a conf. parameter and changed to
> <meta http-equiv="Content-Type" content="text/html; charset=$outputEncoding" />

-- 
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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-722) maven-site-plugin maven-site.vm contains wired encoding

Posted by "Incze Lajos (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-722?page=comments#action_44485 ] 

Incze Lajos commented on MNG-722:
---------------------------------

You are not alone. No, at the moment it works with UTF-8, but not e.g. with ISO-8859-1.

I have a pom.xml. It is an UTF-8 xml file with accented characters. If I set the new outputEncoding
conf parameter, now I have a well rendered team list with UTF-8 output. But if I set outputEncoding
to ISO-8859-1, I'm given the same garbage az at the start.

The problem, I think, is with the above mentioned velocity properties (namely, output.encoding, the
input.encoding doesn't matter, as the maven-site.vm is pure ascii). The outputEncoding param is
rendered only into the output xhtml, regardless of the output.encoding velocity parameter (which
seems to be UTF-8 for some reason, I don't know, it is hard to find where it is set). So, before
merging the template this parameter should be set for velocity.

> maven-site-plugin maven-site.vm contains wired encoding
> -------------------------------------------------------
>
>          Key: MNG-722
>          URL: http://jira.codehaus.org/browse/MNG-722
>      Project: Maven 2
>         Type: Bug
>   Components: maven-plugins
>     Versions: 2.0-beta-1
>  Environment: all
>     Reporter: Incze Lajos
>     Assignee: Vincent Siveton

>
>
> maven-site-plugin maven-site.vm contains wired encoding:
> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
> It probably needs a conf. parameter and changed to
> <meta http-equiv="Content-Type" content="text/html; charset=$outputEncoding" />

-- 
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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-722) maven-site-plugin maven-site.vm contains wired encoding

Posted by "Vincent Siveton (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-722?page=comments#action_44308 ] 

Vincent Siveton commented on MNG-722:
-------------------------------------

I have added an outputEncoding parameter in the DoxiaMojo class.

I am not sure about Velocity settings. 
If you have the following configuration:
<?xml version="1.0" encoding="utf-8"?>
...
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-site-plugin</artifactId>
        <configuration>
          <outputEncoding>utf-8</outputEncoding>
        </configuration>
      </plugin>
    </plugins>
  </build>
...

the name "György" will be correctly displayed.

Could you try it with your POM? and give me your feedback.


> maven-site-plugin maven-site.vm contains wired encoding
> -------------------------------------------------------
>
>          Key: MNG-722
>          URL: http://jira.codehaus.org/browse/MNG-722
>      Project: Maven 2
>         Type: Bug
>   Components: maven-plugins
>     Versions: 2.0-beta-1
>  Environment: all
>     Reporter: Incze Lajos

>
>
> maven-site-plugin maven-site.vm contains wired encoding:
> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
> It probably needs a conf. parameter and changed to
> <meta http-equiv="Content-Type" content="text/html; charset=$outputEncoding" />

-- 
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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-722) maven-site-plugin maven-site.vm contains wired encoding

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-722?page=comments#action_44458 ] 

Brett Porter commented on MNG-722:
----------------------------------

I'm confused, is this working completely?

> maven-site-plugin maven-site.vm contains wired encoding
> -------------------------------------------------------
>
>          Key: MNG-722
>          URL: http://jira.codehaus.org/browse/MNG-722
>      Project: Maven 2
>         Type: Bug
>   Components: maven-plugins
>     Versions: 2.0-beta-1
>  Environment: all
>     Reporter: Incze Lajos
>     Assignee: Vincent Siveton

>
>
> maven-site-plugin maven-site.vm contains wired encoding:
> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
> It probably needs a conf. parameter and changed to
> <meta http-equiv="Content-Type" content="text/html; charset=$outputEncoding" />

-- 
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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-722) maven-site-plugin maven-site.vm contains wired encoding

Posted by "Vincent Siveton (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-722?page=comments#action_44518 ] 

Vincent Siveton commented on MNG-722:
-------------------------------------

I think you did it the right way. Thanks a lot!

Moreover, with your proposal, we could now handle html entities in the site descriptor, for instance:
<menu name="name".../> where name contains html entities (ie &#xhexa)

I will fix it shortly.


> maven-site-plugin maven-site.vm contains wired encoding
> -------------------------------------------------------
>
>          Key: MNG-722
>          URL: http://jira.codehaus.org/browse/MNG-722
>      Project: Maven 2
>         Type: Bug
>   Components: maven-plugins
>     Versions: 2.0-beta-1
>  Environment: all
>     Reporter: Incze Lajos
>     Assignee: Vincent Siveton
>  Attachments: patch.txt
>
>
> maven-site-plugin maven-site.vm contains wired encoding:
> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
> It probably needs a conf. parameter and changed to
> <meta http-equiv="Content-Type" content="text/html; charset=$outputEncoding" />

-- 
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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org