Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unmappable character for encoding ASCII but my files are in UTF-8

I have the following error launching my ant script:

[javac] /****/TextUtils.java:25: error: unmappable character for encoding ASCII

But this file is encoded in UTF-8, if i do the info command:

/***/TextUtils.java: text/plain; charset=utf-8

Why is this file compiled in ASCII and not in utf-8?

I tried to force the encoding in utf-8 on the javac command in my ant build file but without success

like image 635
Jerome Ansia Avatar asked Sep 26 '14 19:09

Jerome Ansia


1 Answers

Setting the Default Java File Encoding to UTF-8:

export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8

From ant: warning: unmappable character for encoding UTF8

like image 147
Alexey Semenyuk Avatar answered Oct 17 '22 05:10

Alexey Semenyuk