You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Gilles Sadowski <gi...@harfang.homelinux.org> on 2012/11/16 17:36:24 UTC
[All] Re: UTF-8 encoding of Javadoc
Hi.
> I think I've spotted the reason why the javadoc does not come out right
> with UTF-8 characters.
> Our pom.xml defines the following properties
> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
>
> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
> which should produce the correct result if the default configuration of the
> javadoc plugin is used [1].
>
> However, the parent pom.xml does not use the javadoc plugin default config.
> Instead, it uses two properties, namely commons.encoding and
> commons.docEncoding
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-javadoc-plugin</artifactId>
> ...
> <configuration>
> ...
> <encoding>${commons.encoding}</encoding>
> <docEncoding>${commons.docEncoding}</docEncoding>
> ...
> </configuration>
> </plugin>
>
> which are defined as follows
> <commons.encoding>iso-8859-1</commons.encoding>
> <commons.docEncoding>${commons.encoding}</commons.docEncoding>
I'd think that this should be changed here.
Gilles
>
> So, we should first override commons.encoding in our own pom.xml
> <commons.encoding>UTF-8</commons.encoding>
>
> We should also get rid of the following lines in our pom.xml
> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
>
> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
>
> since the parent pom.xml defines these two properties as
>
> <project.build.sourceEncoding>${commons.encoding}</project.build.sourceEncoding>
>
> <project.reporting.outputEncoding>${commons.encoding}</project.reporting.outputEncoding>
>
>
> I've performed these changes locally, and it seems to be working OK.
> However, I'm a bit shy. I'm no maven guru, and I'd rather someone had a
> look into this before I commit the changes.
>
> Best regards,
> Sébastien
>
> [1]
> http://maven.apache.org/plugins/maven-javadoc-plugin/faq.html#What_are_the_values_of_encoding_docencoding_and_charset_parameters
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [All] Re: UTF-8 encoding of Javadoc
Posted by Sébastien Brisard <se...@m4x.org>.
Hi Gilles,
2012/11/17 Gilles Sadowski <gi...@harfang.homelinux.org>
> On Fri, Nov 16, 2012 at 08:09:13PM +0100, Sébastien Brisard wrote:
> > Hi,
> >
> > 2012/11/16 Gilles Sadowski <gi...@harfang.homelinux.org>
> >
> > > Hi.
> > >
> > > > I think I've spotted the reason why the javadoc does not come out
> right
> > > > with UTF-8 characters.
> > > > Our pom.xml defines the following properties
> > > >
> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
> > > >
> > > >
> > >
> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
> > > > which should produce the correct result if the default configuration
> of
> > > the
> > > > javadoc plugin is used [1].
> > > >
> > > > However, the parent pom.xml does not use the javadoc plugin default
> > > config.
> > > > Instead, it uses two properties, namely commons.encoding and
> > > > commons.docEncoding
> > > > <plugin>
> > > > <groupId>org.apache.maven.plugins</groupId>
> > > > <artifactId>maven-javadoc-plugin</artifactId>
> > > > ...
> > > > <configuration>
> > > > ...
> > > > <encoding>${commons.encoding}</encoding>
> > > > <docEncoding>${commons.docEncoding}</docEncoding>
> > > > ...
> > > > </configuration>
> > > > </plugin>
> > > >
> > > > which are defined as follows
> > > > <commons.encoding>iso-8859-1</commons.encoding>
> > > > <commons.docEncoding>${commons.encoding}</commons.docEncoding>
> > >
> > > I'd think that this should be changed here.
> > >
> > > What do you mean? In the parent pom? I think this is a radical change;
> > maybe not everyone is keen on using UTF-8 encoding.
>
> According to that other thread about the CMS, I assumed that UTF-8 should
> be
> the default here too.
>
> Ah, I understand, now. What we can do is perform the changes locally (CM
only) for the time being, that would be the quickest I think. Then when
migration to CMS is done, maybe overriding commons.encoding will become
unnecessary. We will then remove it from our pom. I'll keep an eye on
future releases of commons-parent.
>
> > The changes I propose (they must be validated by others more familiar
> with
> > maven) keep the spirit of our own pom, in which we override the default
> > encoding. Only, this default encoding is at the moment not correctly
> > overriden.
>
> As you said that it works, and nobody emitted an objection, I assume that
> you are free to fix the problem.
>
> It *seems* to work, but as I said, I'm no maven guru, and maybe there are
some side-effect. OK let's give this change a go, and we'll see.
Thanks for your advice,
Sébastien
Re: [All] Re: UTF-8 encoding of Javadoc
Posted by Gilles Sadowski <gi...@harfang.homelinux.org>.
On Fri, Nov 16, 2012 at 08:09:13PM +0100, Sébastien Brisard wrote:
> Hi,
>
> 2012/11/16 Gilles Sadowski <gi...@harfang.homelinux.org>
>
> > Hi.
> >
> > > I think I've spotted the reason why the javadoc does not come out right
> > > with UTF-8 characters.
> > > Our pom.xml defines the following properties
> > > <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
> > >
> > >
> > <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
> > > which should produce the correct result if the default configuration of
> > the
> > > javadoc plugin is used [1].
> > >
> > > However, the parent pom.xml does not use the javadoc plugin default
> > config.
> > > Instead, it uses two properties, namely commons.encoding and
> > > commons.docEncoding
> > > <plugin>
> > > <groupId>org.apache.maven.plugins</groupId>
> > > <artifactId>maven-javadoc-plugin</artifactId>
> > > ...
> > > <configuration>
> > > ...
> > > <encoding>${commons.encoding}</encoding>
> > > <docEncoding>${commons.docEncoding}</docEncoding>
> > > ...
> > > </configuration>
> > > </plugin>
> > >
> > > which are defined as follows
> > > <commons.encoding>iso-8859-1</commons.encoding>
> > > <commons.docEncoding>${commons.encoding}</commons.docEncoding>
> >
> > I'd think that this should be changed here.
> >
> > What do you mean? In the parent pom? I think this is a radical change;
> maybe not everyone is keen on using UTF-8 encoding.
According to that other thread about the CMS, I assumed that UTF-8 should be
the default here too.
>
> The changes I propose (they must be validated by others more familiar with
> maven) keep the spirit of our own pom, in which we override the default
> encoding. Only, this default encoding is at the moment not correctly
> overriden.
As you said that it works, and nobody emitted an objection, I assume that
you are free to fix the problem.
Best regards,
Gilles
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [All] Re: UTF-8 encoding of Javadoc
Posted by Sébastien Brisard <se...@m4x.org>.
Hi,
2012/11/16 Gilles Sadowski <gi...@harfang.homelinux.org>
> Hi.
>
> > I think I've spotted the reason why the javadoc does not come out right
> > with UTF-8 characters.
> > Our pom.xml defines the following properties
> > <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
> >
> >
> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
> > which should produce the correct result if the default configuration of
> the
> > javadoc plugin is used [1].
> >
> > However, the parent pom.xml does not use the javadoc plugin default
> config.
> > Instead, it uses two properties, namely commons.encoding and
> > commons.docEncoding
> > <plugin>
> > <groupId>org.apache.maven.plugins</groupId>
> > <artifactId>maven-javadoc-plugin</artifactId>
> > ...
> > <configuration>
> > ...
> > <encoding>${commons.encoding}</encoding>
> > <docEncoding>${commons.docEncoding}</docEncoding>
> > ...
> > </configuration>
> > </plugin>
> >
> > which are defined as follows
> > <commons.encoding>iso-8859-1</commons.encoding>
> > <commons.docEncoding>${commons.encoding}</commons.docEncoding>
>
> I'd think that this should be changed here.
>
> What do you mean? In the parent pom? I think this is a radical change;
maybe not everyone is keen on using UTF-8 encoding.
The changes I propose (they must be validated by others more familiar with
maven) keep the spirit of our own pom, in which we override the default
encoding. Only, this default encoding is at the moment not correctly
overriden.
Best regards,
Sébastien
> Gilles
>
> >
> > So, we should first override commons.encoding in our own pom.xml
> > <commons.encoding>UTF-8</commons.encoding>
> >
> > We should also get rid of the following lines in our pom.xml
> > <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
> >
> >
> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
> >
> > since the parent pom.xml defines these two properties as
> >
> >
> <project.build.sourceEncoding>${commons.encoding}</project.build.sourceEncoding>
> >
> >
> <project.reporting.outputEncoding>${commons.encoding}</project.reporting.outputEncoding>
> >
> >
> > I've performed these changes locally, and it seems to be working OK.
> > However, I'm a bit shy. I'm no maven guru, and I'd rather someone had a
> > look into this before I commit the changes.
> >
> > Best regards,
> > Sébastien
> >
> > [1]
> >
> http://maven.apache.org/plugins/maven-javadoc-plugin/faq.html#What_are_the_values_of_encoding_docencoding_and_charset_parameters
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>