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.

For example the following class

public class Test {
    private String test = "Hans im Glück";

results in the following class file

Hans im Glück

Compiling in the Designer results in the correct

"Hans im Glück"



asked 23.09.2016 at 11:27

Michael's gravatar image

accept rate: 0%

edited 22.11.2016 at 13:57

Reguel%20Wermelinger's gravatar image

Reguel Werme... ♦♦


Hi Michael

Unfortunately there is no setting to change the encoding.
It seems that there is an issue with the Project Build Plugin, which leads to the wrong class file. We will analyze that and fix it in a future version.

Thank you for reporting this.

Kind regards Barbara

(26.09.2016 at 16:21) Barbara Brugger ♦♦ Barbara%20Brugger's gravatar image

We've introduced a new configuration parameter to set the 'encoding' for all sources of a project. http://axonivy.github.io/project-build-plugin/snapshot/6.3/compileProject-mojo.html#encoding

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: http://developer.axonivy.com/dev-releases/nightly.html

We'd love to get feedback if this works for your project:


you will also need a configuration to use sonatype snapshot repository in order to get this release:

        <!-- Snapshot releases are not deployed to maven central. So the repo on sonatype could be used instead -->

answered 30.09.2016 at 09:38

Reguel%20Wermelinger's gravatar image

Reguel Werme... ♦♦
accept rate: 70%

edited 30.09.2016 at 09:45

Another solution to work around this problem is to keep the default encoding and encode special characters with embedded unicode chars by using \u


public class TestUnicode
  private static char UNICODE_UE = '\u00FC';

  public void unicodeOut()
    System.out.println("Hans im Gl"+UNICODE_UE+"ck");

answered 25.10.2016 at 14:29

Reguel%20Wermelinger's gravatar image

Reguel Werme... ♦♦
accept rate: 70%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 23.09.2016 at 11:27

Seen: 2,448 times

Last updated: 22.11.2016 at 13:57