<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: Project Build Plugin UTF-8 Encoding</title><link>https://answers.axonivy.com/questions/2044/project-build-plugin-utf-8-encoding</link><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Is there a setting for the source encoding in the Project Build Plugin?
Changing the default encoding (windows-1252) to UTF-8 results in a wrong class file.&lt;/p&gt;
&lt;p&gt;For example the following class&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;public class Test {
    private String test = "Hans im Glück";
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;results in the following class file&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;....
Hans im GlÃƒÂ¼ck
....
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Compiling in the Designer results in the correct&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;...
"Hans im GlÃ¼ck"
...
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Michael&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/2044/project-build-plugin-utf-8-encoding" rel="self"></atom:link><language>en</language><lastBuildDate>Tue, 25 Oct 2016 14:29:36 -0400</lastBuildDate><item><title>Answer by Reguel Wermelinger</title><link>https://answers.axonivy.com/questions/2044/project-build-plugin-utf-8-encoding/2138</link><description>&lt;p&gt;Another solution to work around this problem is to keep the default encoding and encode special characters with embedded unicode chars by using \u &lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;public class TestUnicode
{
  private static char UNICODE_UE = '\u00FC';

  @Test
  public void unicodeOut()
  {
    System.out.println("Hans im Gl"+UNICODE_UE+"ck");
  }
}
&lt;/code&gt;&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reguel Wermelinger</dc:creator><pubDate>Tue, 25 Oct 2016 14:29:36 -0400</pubDate><guid>https://answers.axonivy.com/questions/2044/project-build-plugin-utf-8-encoding/2138</guid></item><item><title>Answer by Reguel Wermelinger</title><link>https://answers.axonivy.com/questions/2044/project-build-plugin-utf-8-encoding/2067</link><description>&lt;p&gt;We've introduced a new configuration parameter to set the 'encoding' for all sources of a project. &lt;a href="http://axonivy.github.io/project-build-plugin/snapshot/6.3/compileProject-mojo.html#encoding"&gt;http://axonivy.github.io/project-build-plugin/snapshot/6.3/compileProject-mojo.html#encoding&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It is yet only possible to use this feature if you use the latest SNAPSHOT release of the project-build-plugin plus a nightly engine: &lt;a href="http://developer.axonivy.com/dev-releases/nightly.html"&gt;http://developer.axonivy.com/dev-releases/nightly.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;We'd love to get feedback if this works for your project:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  &amp;lt;plugin&amp;gt;
    &amp;lt;groupId&amp;gt;com.axonivy.ivy.ci&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;project-build-plugin&amp;lt;/artifactId&amp;gt;
    &amp;lt;version&amp;gt;6.3.1-SNAPSHOT&amp;lt;/version&amp;gt;
    &amp;lt;extensions&amp;gt;true&amp;lt;/extensions&amp;gt;
    &amp;lt;configuration&amp;gt;
        &amp;lt;encoding&amp;gt;UTF-8&amp;lt;/encoding&amp;gt;
        &amp;lt;engineListPageUrl&amp;gt;&lt;a href="http://developer.axonivy.com/dev-releases/nightly.html&lt;/engineListPageUrl&gt;"&gt;http://developer.axonivy.com/dev-releases/nightly.html&amp;lt;/engineListPageUrl&amp;gt;&lt;/a&gt;
    &amp;lt;/configuration&amp;gt;
  &amp;lt;/plugin&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;you will also need a configuration to use sonatype snapshot repository in order to get this release:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;pluginRepositories&amp;gt;
        &amp;lt;!-- Snapshot releases are not deployed to maven central. So the repo on sonatype could be used instead --&amp;gt;
        &amp;lt;pluginRepository&amp;gt;
            &amp;lt;id&amp;gt;sonatype&amp;lt;/id&amp;gt;
            &amp;lt;url&amp;gt;&lt;a href="https://oss.sonatype.org/content/repositories/snapshots&lt;/url&gt;"&gt;https://oss.sonatype.org/content/repositories/snapshots&amp;lt;/url&amp;gt;&lt;/a&gt;
            &amp;lt;snapshots&amp;gt;
                &amp;lt;updatePolicy&amp;gt;always&amp;lt;/updatePolicy&amp;gt;
            &amp;lt;/snapshots&amp;gt;
        &amp;lt;/pluginRepository&amp;gt;
&amp;lt;/pluginRepositories&amp;gt;
&lt;/code&gt;&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reguel Wermelinger</dc:creator><pubDate>Fri, 30 Sep 2016 09:38:23 -0400</pubDate><guid>https://answers.axonivy.com/questions/2044/project-build-plugin-utf-8-encoding/2067</guid></item></channel></rss>