Closed ghost closed 2 years ago
Your platform encoding is set to US-ASCII. Default encoding for Linux is expected to be UTF-8.
I see you are using Debian built-in tools. Can you try using Java 11 from https://adoptopenjdk.net/ with ant from https://ant.apache.org/ ?
My initial install of Ant was from the Apache website. I followed the Debian install instructions on the adoptopenjdk website, and confirmed that the same error was present.
I used the setup from this SO answer to check the file encoding in Java:
# javac PrintCharSets.java && java PrintCharSets
file.encoding=ANSI_X3.4-1968
Charset.defaultCharset=US-ASCII
InputStreamReader.getEncoding=ASCII
# javac PrintCharSets.java && LC_ALL=en_US.UTF-8 java PrintCharSets
file.encoding=UTF-8
Charset.defaultCharset=UTF-8
InputStreamReader.getEncoding=UTF8
The Java encoding seems to depend on the system locale in Linux, but I don't think it can be assumed that the system locale supports unicode. In my case, for example, I was building in a Docker container, which is why the system locale wasn't configured. However, the compile option in my previous comment overrode that setting.
Would it be possible to specify unicode encoding, either via the compile options (as in my previous comment) or in the README?
Updated build.xml with your proposed change
Hello,
I had an issue compiling OpenXLIFF from master with ant, but I managed to fix it by setting the javac compiler option below in
build.xml
. Would you like me to submit a pull request?Problem
Fix
in
build.xml
:Environment