title: Encoding issues using tycho surefire plugin
body: <p>I've been turning my head around with this issue and cannot find an explanation for what is happening here.
  I'm using tycho surefire plugin to build a set of eclipse plugins and execute some unit tests.
  Here's the environment:</p>
  <pre><code>tycho-surefire-plugin: version 0.19.0 //very old I know, but I'm stuck with legacy code
  maven 3.5.2
  jdk 8
  windows 10
  </code></pre>
  <p>I've started with a simple test case to test a method that replaces special characters with their simple version:</p>
  <pre><code>String input = &quot;á:Á-é:É-í:Í-ó:Ó-ú:Ú-ñ:Ñ  &quot;;
  System.out.println(&quot;testing input: &quot; + input);
  Assert.assertEquals(&quot;a A e E i I o O u U n N &quot;,
      Utils.sanitize(input, true));
  </code></pre>
  <p>the problem here is that when executing the junit directly on eclipse I get the expected result, so the test passes, but when I execute the tycho build I get:</p>
  <pre><code>testing input: ?:?-?:?-?:?-?:?-?:?-?:?
  Failed tests:   testSanitizeWithSpaces(com.fja.eos.automation.UtilsTest): expected:&lt;[a A e E i I o O u U n N] &gt; but was:&lt;[o o o o o o o o o o o o] &gt;
  </code></pre>
  <p>The value for</p>
  <pre><code>System.out.println(&quot;Default charset: &quot; + Charset.defaultCharset());
  </code></pre>
  <p>is the same in both scenarios:</p>
  <pre><code>Default charset: windows-1252
  </code></pre>
  <p>my next attempt was to read the input value from a file, controlling the charset using:</p>
  <pre><code>InputStream is = UtilsTest.class
      .getResourceAsStream(&quot;sanitationTestSubjects.xml&quot;);
  InputSource source = new InputSource(is);
  source.setEncoding(&quot;ISO-8859-1&quot;);
  Document doc = builder.parse(is);
  </code></pre>
  <p>for the file</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot; ?&gt;
  &lt;SanitationTestSubjects&gt;
      &lt;Subject input=&quot;á:Á-é:É-í:Í-ó:Ó-ú:Ú-ñ:Ñ  &quot; expected=&quot;a A e E i I o O u U n N &quot; /&gt;
  &lt;/SanitationTestSubjects&gt;
  </code></pre>
  <p>while reading the input like this I got a slightly different result:</p>
  <pre><code>testing input: á:?-é:É-í:?-ó:?-ú:?-ñ:Ñ
  </code></pre>
  <p>but still not correct. If I try to get the escaped input with</p>
  <pre><code>StringEscapeUtils.escapeJava(elem.getAttribute(&quot;input&quot;))
  </code></pre>
  <p>I get what it seems to be the correct unicode sequence:</p>
  <pre><code>Escaped input: \u00E1:\u00C1-\u00E9:\u00C9-\u00ED:\u00CD-\u00F3:\u00D3-\u00FA:\u00DA-\u00F1:\u00D1
  </code></pre>
  <p>I've tried setting all character encoding options on the tycho-surefire-plugin without any change on behavior:</p>
  <pre><code>&lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.eclipse.tycho&lt;/groupId&gt;
                  &lt;artifactId&gt;tycho-surefire-plugin&lt;/artifactId&gt;
                  &lt;version&gt;${tycho-version}&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;appArgLine&gt;-Dfile.encoding=ISO-8859-1&lt;/appArgLine&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-resources-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.2.0&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;encoding&gt;ISO-8859-1&lt;/encoding&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  </code></pre>
  <p>one more test, compiling the files on eclipse and with maven results in binary equal files..</p>
  <p>UPDATE:
  the encoding of the java file itself was set to cp1252, after changing it to ISO-8859-1 I got the same result as reading the value from a file.. still not there..</p>
  <p>I'm really feeling that I'm looking to the wrong side of the problem.
  can anyone please help?</p>