Messed up encoding with Jack Compiler

63 Views Asked by At

After enabling Jack Options i can't print a String with special characters such as the euro sign (€) or Greek letters.I've tried to change encoding to UTF-8 with no luck.Any suggestions?Disabling Jack Options solves the problem, but i need Java 8 support.

String str="€";
byte[] arrByte = new byte[0];

    try {
        arrByte = str.getBytes("UTF-8");
    } catch (UnsupportedEncodingException e) {e.printStackTrace();}

    System.out.println(new String(arrByte));
1

There are 1 best solutions below

0
On

I added the following line, as was suggested here, in gradle.properties and the encoding seems to be fixed now.

org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8