-1

Have an ant build script which builds some java files. These files may have existed in a windows environment previously, though I am attempting to build and compile them on OSX. The file in question seems to be encoded with the following

u'Western (Windows 1252)'

The error I receive is

error: unmappable character for encoding UTF8

Does anyone have experience rectifying these types of issues?

user2524908
  • 861
  • 4
  • 18
  • 46
  • Re-save the file with UTF-8 encoding and re-run the ANT target. Should fix your issue. – Kon Jan 05 '16 at 21:51
  • 1
    And already asked lots of times:, for example: http://stackoverflow.com/questions/4995057/unmappable-character-for-encoding-utf-8-error – kfunk Jan 05 '16 at 23:10

1 Answers1

1

Open the file with a text editor that allows good control over coding, such as Emacs, and save the file in UTF-8.

Cecilio Pardo
  • 1,717
  • 10
  • 13