You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Gisbert Amm <gi...@webde.de> on 2005/11/15 16:08:03 UTC

[M 1.1b1] Maven-Reports: Encoding Problems

We face encoding problems with the Maven-Reports. The output is declared 
to be ISO-8859-1 (Latin 1), but it actually isn't (neither the XML nor 
the HTML). Non-ASCII characters like German umlauts are not transcoded 
properly.

I noticed the same problem in the docs of the official maven tasklist 
plugin at 
http://maven.apache.org/maven-1.x/reference/plugins/tasklist/checkstyle/, 
e.g.: La variable 'destDir' devrait être privée et avoir des accesseurs.

When I set maven.docs.outputencoding to UTF-8 it is even worse: The 
transformation then makes apparently two wrong bytes out of every single 
byte of the aready erroneous transcoded characters.

I've not found any hint in the docs or in Jira so far; can somebody 
please shed some light on it for me?

I'm using Maven 1.1 beta 1.

Regards,
Gisbert Amm

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [M 1.1b1] Maven-Reports: Encoding Problems

Posted by Gisbert Amm <gi...@webde.de>.
That did it. Thank you!

Gisbert Amm

Lukas Theussl wrote:
> For this you probably have to set the maven.compile.encoding option of 
> the java plugin.
> 
> Gisbert Amm wrote:
> 
>> With the described workaround I face another problem:
>>
>> In some of our sources there is code to replace non-ASCII characters 
>> like that:
>>
>> for(int i=0; i < length; i++) {
>>             char c = input.charAt(i);
>>             switch(c) {
>>               case 'Ä':     builder.append("Ae"); break;
>>               case 'ä':     builder.append("ae"); break;
>>               case 'Ö':     builder.append("Oe"); break;
>>               case 'ö':     builder.append("oe"); break;
>>               case 'Ü':     builder.append("Ue"); break;
>>               case 'ü':     builder.append("ue"); break;
>>               case 'ß':     builder.append("ss"); break;
>>               ...
>>               default:      builder.append(c);
>>             }
>>
>> When I set the LANG variable to de_DE.utf8, the compiler finds \ufffd 
>> instead of Ä,ä,Ö,ö,Ü,Ü,ß and stops with a "duplicate case label" error.
>>
>> Is there a way to get around this?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [M 1.1b1] Maven-Reports: Encoding Problems

Posted by Lukas Theussl <lt...@apache.org>.
For this you probably have to set the maven.compile.encoding option of 
the java plugin.

HTH,
Lukas


Gisbert Amm wrote:
> With the described workaround I face another problem:
> 
> In some of our sources there is code to replace non-ASCII characters 
> like that:
> 
> for(int i=0; i < length; i++) {
>             char c = input.charAt(i);
>             switch(c) {
>               case 'Ä':     builder.append("Ae"); break;
>               case 'ä':     builder.append("ae"); break;
>               case 'Ö':     builder.append("Oe"); break;
>               case 'ö':     builder.append("oe"); break;
>               case 'Ü':     builder.append("Ue"); break;
>               case 'ü':     builder.append("ue"); break;
>               case 'ß':     builder.append("ss"); break;
>               ...
>               default:      builder.append(c);
>             }
> 
> When I set the LANG variable to de_DE.utf8, the compiler finds \ufffd 
> instead of Ä,ä,Ö,ö,Ü,Ü,ß and stops with a "duplicate case label" error.
> 
> Is there a way to get around this?
> 
> Thanks in advance for your help,
> Gisbert Amm
> 
> 
> Gisbert Amm wrote:
> 
>> I finally found something I consider a workaround for the checkstyle 
>> report (I already use the 3.0-SNAPSHOT of the plugin) and the xdocs:
>>
>> I'v changed the locale settings on my SuSE 9.1 system like that
>>
>> export LANG=de_DE.utf8
>> export LC_CTYPE=de_DE.utf8
>>
>> (setting of LC_CTYPE was necessary aswell)
>>
>> and set the following Maven properties:
>>
>> maven.docs.outputencoding=UTF-8
>> maven.xdoc.locale.default=de_DE.utf8
>>
>> Now the German umlauts are displayed correctly within the checkstyle 
>> report and the documents generated out of the xdocs (like index.xml). 
>> However, other reports like Javadoc, Source Xref and Test Xref still 
>> suffer from wrong encoded characters.
>>
>> Regards,
>> Gisbert Amm
>>
>> Lukas Theussl wrote:
>>
>>> On Linux you also have to set the system encoding explicitly,
>>> see 
>>> http://maven.apache.org/maven-1.x/reference/plugins/xdoc/faq.html#problems-unicode 
>>>
>>> Arnaud HERITIER wrote:
>>>
>>>> For checkstyle it fixes only the locale.
>>>> It doesn't help for the encoding :-(
>>>>
>>>>> -----Message d'origine-----
>>>>> De : Lukas Theussl [mailto:ltheussl@apache.org] Envoyé : mercredi 
>>>>> 16 novembre 2005 00:03
>>>>>
>>>>> For the checkstyle plugin this should be fixed in the current 
>>>>> 3.0-SNAPSHOT (see http://jira.codehaus.org/browse/MPCHECKSTYLE-39 
>>>>> ), but it might still be a problem for other plugins.
>>>>>
>>>>> Gisbert, which plugins/reports do you have problems with?
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [M 1.1b1] Maven-Reports: Encoding Problems

Posted by Gisbert Amm <gi...@webde.de>.
With the described workaround I face another problem:

In some of our sources there is code to replace non-ASCII characters 
like that:

for(int i=0; i < length; i++) {
             char c = input.charAt(i);
             switch(c) {
               case 'Ä':     builder.append("Ae"); break;
               case 'ä':     builder.append("ae"); break;
               case 'Ö':     builder.append("Oe"); break;
               case 'ö':     builder.append("oe"); break;
               case 'Ü':     builder.append("Ue"); break;
               case 'ü':     builder.append("ue"); break;
               case 'ß':     builder.append("ss"); break;
               ...
               default:      builder.append(c);
             }

When I set the LANG variable to de_DE.utf8, the compiler finds \ufffd 
instead of Ä,ä,Ö,ö,Ü,Ü,ß and stops with a "duplicate case label" error.

Is there a way to get around this?

Thanks in advance for your help,
Gisbert Amm


Gisbert Amm wrote:
> I finally found something I consider a workaround for the checkstyle 
> report (I already use the 3.0-SNAPSHOT of the plugin) and the xdocs:
> 
> I'v changed the locale settings on my SuSE 9.1 system like that
> 
> export LANG=de_DE.utf8
> export LC_CTYPE=de_DE.utf8
> 
> (setting of LC_CTYPE was necessary aswell)
> 
> and set the following Maven properties:
> 
> maven.docs.outputencoding=UTF-8
> maven.xdoc.locale.default=de_DE.utf8
> 
> Now the German umlauts are displayed correctly within the checkstyle 
> report and the documents generated out of the xdocs (like index.xml). 
> However, other reports like Javadoc, Source Xref and Test Xref still 
> suffer from wrong encoded characters.
> 
> Regards,
> Gisbert Amm
> 
> Lukas Theussl wrote:
>> On Linux you also have to set the system encoding explicitly,
>> see 
>> http://maven.apache.org/maven-1.x/reference/plugins/xdoc/faq.html#problems-unicode 
>>
>> Arnaud HERITIER wrote:
>>
>>> For checkstyle it fixes only the locale.
>>> It doesn't help for the encoding :-(
>>>
>>>> -----Message d'origine-----
>>>> De : Lukas Theussl [mailto:ltheussl@apache.org] Envoyé : mercredi 16 
>>>> novembre 2005 00:03
>>>>
>>>> For the checkstyle plugin this should be fixed in the current 
>>>> 3.0-SNAPSHOT (see http://jira.codehaus.org/browse/MPCHECKSTYLE-39 ), 
>>>> but it might still be a problem for other plugins.
>>>>
>>>> Gisbert, which plugins/reports do you have problems with?

-- 
Gisbert Amm
Softwareentwickler Infrastruktur

WEB.DE GmbH
Amalienbadstraße 41 · D-76227 Karlsruhe
Tel. +49-721-94329-8530 · Fax +49-721-94329-22
gisbert.amm@webde.de · http://www.web.de/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [M 1.1b1] Maven-Reports: Encoding Problems

Posted by Gisbert Amm <gi...@webde.de>.
I finally found something I consider a workaround for the checkstyle 
report (I already use the 3.0-SNAPSHOT of the plugin) and the xdocs:

I'v changed the locale settings on my SuSE 9.1 system like that

export LANG=de_DE.utf8
export LC_CTYPE=de_DE.utf8

(setting of LC_CTYPE was necessary aswell)

and set the following Maven properties:

maven.docs.outputencoding=UTF-8
maven.xdoc.locale.default=de_DE.utf8

Now the German umlauts are displayed correctly within the checkstyle 
report and the documents generated out of the xdocs (like index.xml). 
However, other reports like Javadoc, Source Xref and Test Xref still 
suffer from wrong encoded characters.

Regards,
Gisbert Amm

Lukas Theussl wrote:
> On Linux you also have to set the system encoding explicitly,
> see 
> http://maven.apache.org/maven-1.x/reference/plugins/xdoc/faq.html#problems-unicode 
> 
> Arnaud HERITIER wrote:
> 
>> For checkstyle it fixes only the locale.
>> It doesn't help for the encoding :-(
>>
>>> -----Message d'origine-----
>>> De : Lukas Theussl [mailto:ltheussl@apache.org] Envoyé : mercredi 16 
>>> novembre 2005 00:03
>>>
>>> For the checkstyle plugin this should be fixed in the current 
>>> 3.0-SNAPSHOT (see http://jira.codehaus.org/browse/MPCHECKSTYLE-39 ), 
>>> but it might still be a problem for other plugins.
>>>
>>> Gisbert, which plugins/reports do you have problems with?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [M 1.1b1] Maven-Reports: Encoding Problems

Posted by Lukas Theussl <lt...@apache.org>.
On Linux you also have to set the system encoding explicitly,
see 
http://maven.apache.org/maven-1.x/reference/plugins/xdoc/faq.html#problems-unicode

-Lukas


Arnaud HERITIER wrote:

>For checkstyle it fixes only the locale.
>It doesn't help for the encoding :-(
>
>Arnaud
> 
>
>  
>
>>-----Message d'origine-----
>>De : Lukas Theussl [mailto:ltheussl@apache.org] 
>>Envoyé : mercredi 16 novembre 2005 00:03
>>À : Maven Users List
>>Objet : Re: [M 1.1b1] Maven-Reports: Encoding Problems
>>
>>For the checkstyle plugin this should be fixed in the current 
>>3.0-SNAPSHOT (see 
>>http://jira.codehaus.org/browse/MPCHECKSTYLE-39 ), but it 
>>might still be a problem for other plugins.
>>
>>Gisbert, which plugins/reports do you have problems with?
>>
>>-Lukas
>>
>>
>>
>>Arnaud HERITIER wrote:
>>    
>>
>>>I have no workaround in mind actually.
>>>Lukas, any idea ?
>>>
>>>Can you open an issue on the xdoc plugin?
>>>I didn't saw that I published some reports in French :-( !!!!
>>>Thanks to point to me this error.
>>>
>>>Arnaud
>>>
>>>
>>>      
>>>
>>>>-----Message d'origine-----
>>>>De : Gisbert Amm [mailto:gia@webde.de] Envoyé : mardi 15 
>>>>        
>>>>
>>novembre 2005 
>>    
>>
>>>>16:08 À : Maven Users List Objet : [M 1.1b1] Maven-Reports: 
>>>>        
>>>>
>>Encoding 
>>    
>>
>>>>Problems
>>>>
>>>>We face encoding problems with the Maven-Reports. The output is 
>>>>declared to be ISO-8859-1 (Latin 1), but it actually isn't (neither 
>>>>the XML nor the HTML). Non-ASCII characters like German umlauts are 
>>>>not transcoded properly.
>>>>
>>>>I noticed the same problem in the docs of the official 
>>>>        
>>>>
>>maven tasklist 
>>    
>>
>>>>plugin at 
>>>>http://maven.apache.org/maven-1.x/reference/plugins/tasklist/c
>>>>heckstyle/,
>>>>e.g.: La variable 'destDir' devrait être privée et avoir des 
>>>>accesseurs.
>>>>
>>>>When I set maven.docs.outputencoding to UTF-8 it is even
>>>>worse: The transformation then makes apparently two wrong 
>>>>        
>>>>
>>bytes out of 
>>    
>>
>>>>every single byte of the aready erroneous transcoded characters.
>>>>
>>>>I've not found any hint in the docs or in Jira so far; can somebody 
>>>>please shed some light on it for me?
>>>>
>>>>I'm using Maven 1.1 beta 1.
>>>>
>>>>Regards,
>>>>Gisbert Amm
>>>>
>>>>------------------------------------------------------------
>>>>        
>>>>
>>---------
>>    
>>
>>>>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>For additional commands, e-mail: users-help@maven.apache.org
>>>>
>>>>        
>>>>
>>>
>>>
>>>
>>>
>>>      
>>>
>>---------------------------------------------------------------------
>>    
>>
>>>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>      
>>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>For additional commands, e-mail: users-help@maven.apache.org
>>    
>>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: [M 1.1b1] Maven-Reports: Encoding Problems

Posted by Arnaud HERITIER <ah...@gmail.com>.
For checkstyle it fixes only the locale.
It doesn't help for the encoding :-(

Arnaud
 

> -----Message d'origine-----
> De : Lukas Theussl [mailto:ltheussl@apache.org] 
> Envoyé : mercredi 16 novembre 2005 00:03
> À : Maven Users List
> Objet : Re: [M 1.1b1] Maven-Reports: Encoding Problems
> 
> For the checkstyle plugin this should be fixed in the current 
> 3.0-SNAPSHOT (see 
> http://jira.codehaus.org/browse/MPCHECKSTYLE-39 ), but it 
> might still be a problem for other plugins.
> 
> Gisbert, which plugins/reports do you have problems with?
> 
> -Lukas
> 
> 
> 
> Arnaud HERITIER wrote:
> > I have no workaround in mind actually.
> > Lukas, any idea ?
> > 
> > Can you open an issue on the xdoc plugin?
> > I didn't saw that I published some reports in French :-( !!!!
> > Thanks to point to me this error.
> > 
> > Arnaud
> > 
> > 
> >>-----Message d'origine-----
> >>De : Gisbert Amm [mailto:gia@webde.de] Envoyé : mardi 15 
> novembre 2005 
> >>16:08 À : Maven Users List Objet : [M 1.1b1] Maven-Reports: 
> Encoding 
> >>Problems
> >>
> >>We face encoding problems with the Maven-Reports. The output is 
> >>declared to be ISO-8859-1 (Latin 1), but it actually isn't (neither 
> >>the XML nor the HTML). Non-ASCII characters like German umlauts are 
> >>not transcoded properly.
> >>
> >>I noticed the same problem in the docs of the official 
> maven tasklist 
> >>plugin at 
> >>http://maven.apache.org/maven-1.x/reference/plugins/tasklist/c
> >>heckstyle/,
> >>e.g.: La variable 'destDir' devrait être privée et avoir des 
> >>accesseurs.
> >>
> >>When I set maven.docs.outputencoding to UTF-8 it is even
> >>worse: The transformation then makes apparently two wrong 
> bytes out of 
> >>every single byte of the aready erroneous transcoded characters.
> >>
> >>I've not found any hint in the docs or in Jira so far; can somebody 
> >>please shed some light on it for me?
> >>
> >>I'm using Maven 1.1 beta 1.
> >>
> >>Regards,
> >>Gisbert Amm
> >>
> >>------------------------------------------------------------
> ---------
> >>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >>For additional commands, e-mail: users-help@maven.apache.org
> >>
> > 
> > 
> > 
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [M 1.1b1] Maven-Reports: Encoding Problems

Posted by Lukas Theussl <lt...@apache.org>.
For the checkstyle plugin this should be fixed in the current 
3.0-SNAPSHOT (see http://jira.codehaus.org/browse/MPCHECKSTYLE-39 ), but 
it might still be a problem for other plugins.

Gisbert, which plugins/reports do you have problems with?

-Lukas



Arnaud HERITIER wrote:
> I have no workaround in mind actually.
> Lukas, any idea ?
> 
> Can you open an issue on the xdoc plugin?
> I didn't saw that I published some reports in French :-( !!!!
> Thanks to point to me this error.
> 
> Arnaud
> 
> 
>>-----Message d'origine-----
>>De : Gisbert Amm [mailto:gia@webde.de] 
>>Envoyé : mardi 15 novembre 2005 16:08
>>À : Maven Users List
>>Objet : [M 1.1b1] Maven-Reports: Encoding Problems
>>
>>We face encoding problems with the Maven-Reports. The output 
>>is declared to be ISO-8859-1 (Latin 1), but it actually isn't 
>>(neither the XML nor the HTML). Non-ASCII characters like 
>>German umlauts are not transcoded properly.
>>
>>I noticed the same problem in the docs of the official maven 
>>tasklist plugin at 
>>http://maven.apache.org/maven-1.x/reference/plugins/tasklist/c
>>heckstyle/,
>>e.g.: La variable 'destDir' devrait être privée et avoir 
>>des accesseurs.
>>
>>When I set maven.docs.outputencoding to UTF-8 it is even 
>>worse: The transformation then makes apparently two wrong 
>>bytes out of every single byte of the aready erroneous 
>>transcoded characters.
>>
>>I've not found any hint in the docs or in Jira so far; can 
>>somebody please shed some light on it for me?
>>
>>I'm using Maven 1.1 beta 1.
>>
>>Regards,
>>Gisbert Amm
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>For additional commands, e-mail: users-help@maven.apache.org
>>
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [M 1.1b1] Maven-Reports: Encoding Problems

Posted by Gisbert Amm <gi...@webde.de>.
Arnaud HERITIER wrote:
> Can you open an issue on the xdoc plugin?

Done: http://jira.codehaus.org/browse/MPXDOC-184

> I didn't saw that I published some reports in French :-( !!!!
> Thanks to point to me this error.

That wasn't indeed the main purpose of my post ;-)

Thank you!
Gisbert

>>-----Message d'origine-----
>>De : Gisbert Amm [mailto:gia@webde.de] 
>>Envoyé : mardi 15 novembre 2005 16:08
>>À : Maven Users List
>>Objet : [M 1.1b1] Maven-Reports: Encoding Problems
>>
>>We face encoding problems with the Maven-Reports. The output 
>>is declared to be ISO-8859-1 (Latin 1), but it actually isn't 
>>(neither the XML nor the HTML). Non-ASCII characters like 
>>German umlauts are not transcoded properly.
>>
>>I noticed the same problem in the docs of the official maven 
>>tasklist plugin at 
>>http://maven.apache.org/maven-1.x/reference/plugins/tasklist/c
>>heckstyle/,
>>e.g.: La variable 'destDir' devrait être privée et avoir 
>>des accesseurs.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: [M 1.1b1] Maven-Reports: Encoding Problems

Posted by Arnaud HERITIER <ah...@gmail.com>.
I have no workaround in mind actually.
Lukas, any idea ?

Can you open an issue on the xdoc plugin?
I didn't saw that I published some reports in French :-( !!!!
Thanks to point to me this error.

Arnaud

> -----Message d'origine-----
> De : Gisbert Amm [mailto:gia@webde.de] 
> Envoyé : mardi 15 novembre 2005 16:08
> À : Maven Users List
> Objet : [M 1.1b1] Maven-Reports: Encoding Problems
> 
> We face encoding problems with the Maven-Reports. The output 
> is declared to be ISO-8859-1 (Latin 1), but it actually isn't 
> (neither the XML nor the HTML). Non-ASCII characters like 
> German umlauts are not transcoded properly.
> 
> I noticed the same problem in the docs of the official maven 
> tasklist plugin at 
> http://maven.apache.org/maven-1.x/reference/plugins/tasklist/c
> heckstyle/,
> e.g.: La variable 'destDir' devrait être privée et avoir 
> des accesseurs.
> 
> When I set maven.docs.outputencoding to UTF-8 it is even 
> worse: The transformation then makes apparently two wrong 
> bytes out of every single byte of the aready erroneous 
> transcoded characters.
> 
> I've not found any hint in the docs or in Jira so far; can 
> somebody please shed some light on it for me?
> 
> I'm using Maven 1.1 beta 1.
> 
> Regards,
> Gisbert Amm
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org