error: unmappable character for encoding UTF-8

Right-click the project node in the Projects window and choose Properties. In the left column under Categories, select Sources. And set it to ISO-8859-1


It sounds like you have two options:

  • Call the generator using a command-line parameter to generate UTF-8 instead of whatever it's using by default. (You haven't said where this file actually comes from, but I assume the generation is under your control somewhere...)
  • Change how Netbeans handles the file, telling it what encoding it's really in

Personally I'd favour the first option if possible - UTF-8 is a nice "everything supports it" encoding


You have to set the project's encoding correctly.

Right click on your project -> Properties -> Sources -> Encoding

Windows 1252 is a good option to try. It worked for me.

Tags:

Encoding

Utf 8