• Post Reply Bookmark Topic Watch Topic
  • New Topic

unmappable character for encoding UTF8 when compiling by Eclipse  RSS feed

Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using DOS shell on Windows compile successfully, which show that my build.xml file, Ant, JDK setup and the Java source files are ok.

However, using Eclipse to compile (running the build.xml file as an Ant task) fail with the
"unmappable character for encoding UTF8" message.

Then I change the build.xml by adding "encoding" to javac.
The build.xml file originally has

The build.xml file has changed to
which Eclipse compile with the same error.

However, change the build.xml with encoding="cp1252":
which Eclipse compile without any error.

I had already added "UTF-8" to the Default Encoding box in Eclipse for the
Window > Preferences > General > Content Types > Text

Window > Preferences > General > Workspace, set "Text file encoding" to "Other : UTF-8".

Please help.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!