5

I encounter this error (warning: unmappable character for encoding ASCII) when compiling the files using apache-ant-1.7.0 through hudson build server can anyone advise on how to resolve this? I am able to build successfully using windows machine.

leventov
  • 14,760
  • 11
  • 69
  • 98
dfdfd
  • 71
  • 2
  • 4
  • A assume that you run Hudson as a different user and or on a different platform than your reference build on Windows. If that is true, try ti run it with the same user on the same environment than Hudson. Also, have a look a similar question. http://stackoverflow.com/questions/464874/unmappable-character-for-encoding-warning-in-java – Peter Schuetze May 25 '10 at 13:20
  • Found another nice explanation: http://www.jroller.com/ethdsy/entry/unmappable_character_for_encoding_ascii – Peter Schuetze May 25 '10 at 13:24

1 Answers1

7

It sounds like you're compiling source code that contains non-ASCII characters with your platform default encoding (used by javac) set to US-ASCII.

All you have to do is use the encoding attribute of the javac Ant task to specify the encoding you're using to write your source code.

martin clayton
  • 76,436
  • 32
  • 213
  • 198
Michael Borgwardt
  • 342,105
  • 78
  • 482
  • 720