Closed alesky78 closed 7 years ago
Hi Alessandro,
That's a good point, the system default encoding can surprise ant. The encoding for jsettlers is UTF-8, as mentioned in README.developer. (Properties files are ISO-8859-1 per java specs).
I've committed 67cbf88 which forces UTF-8 for javac and javadoc tasks.
Thank you for the suggestion! -Jeremy
PS: Currently the only text files in the repo with non-ascii characters are the properties files, and the pseudolocalization utility class src/java/org/fedorahosted/tennera/antgettext/StringUtil.java
:
$ pcregrep -r -l "[\x80-\xFF]" * |fgrep -v -e ".jar" -e ".sqlite" -e ".class" -e ".gif" -e ".png" -e ".xcf" |xargs file
src/java/net/nand/util/i18n/gui/strings/pte_es.properties: ISO-8859 English text, with very long lines
src/java/org/fedorahosted/tennera/antgettext/StringUtil.java: UTF-8 Unicode C program text
src/java/soc/client/strings/data.properties: ISO-8859 English text
src/java/soc/client/strings/data_es.properties: ISO-8859 English text
src/java/soc/server/strings/toClient.properties: ISO-8859 English text, with very long lines
src/java/soc/server/strings/toClient_es.properties: ISO-8859 English text, with very long lines
target/classes/net/nand/util/i18n/gui/strings/pte_es.properties: ISO-8859 English text, with very long lines
target/classes/soc/client/strings/data.properties: ISO-8859 English text
target/classes/soc/client/strings/data_es.properties: ISO-8859 English text
target/classes/soc/server/strings/toClient.properties: ISO-8859 English text, with very long lines
target/classes/soc/server/strings/toClient_es.properties: ISO-8859 English text, with very long lines
$ iconv -f UTF-8 src/java/org/fedorahosted/tennera/antgettext/StringUtil.java >/dev/null
$ echo $?
0
you are right
the file that created the issue is StringUtil that is in UTF8
same of the file are pushed in the github repository with the iso-8859-1 encoding, but ant by default will use the cp1252 in windows environment
a bug fix for now can be to force javac to use the correct encoding in the build.xml