21

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

Jerome Ansia
  • 6,854
  • 11
  • 53
  • 99

1 Answers1

76

Setting the Default Java File Encoding to UTF-8:

export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8

From ant: warning: unmappable character for encoding UTF8

Community
  • 1
  • 1
Alexey Semenyuk
  • 3,263
  • 2
  • 32
  • 36