dijkstra
dijkstra

Reputation: 1078

error: unmappable character for encoding UTF-8

error: unmappable character for encoding UTF-8. Because of copyright character, I am getting this error. I am using Netbeans 7.2.

/**
 *  � 2006
 * 
 * This class was generated by the JAX-WS RI.
 * JAX-WS RI 2.2.6-2b01 
 * Generated source version: 2.1
 * 

Upvotes: 10

Views: 24797

Answers (4)

Nemət Abdullayev
Nemət Abdullayev

Reputation: 123

I used all of the solutions here, but the problem persisted. Finally,

I have resolved this problem:

  • by changing the netbeans version(From 'version 8.2' to 'apache version 11')

Upvotes: 0

Jatin Gera
Jatin Gera

Reputation: 824

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

Upvotes: 1

thanos.a
thanos.a

Reputation: 2694

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.

Upvotes: 8

Jon Skeet
Jon Skeet

Reputation: 1503280

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

Upvotes: 5

Related Questions