error: unmappable character for encoding UTF-8

后端 未结 4 989
梦谈多话
梦谈多话 2021-01-02 07:44

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

/**
 *  � 2006
 * 
 * This         


        
相关标签:
4条回答
  • 2021-01-02 08:01

    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

    0 讨论(0)
  • 2021-01-02 08:04

    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

    0 讨论(0)
  • 2021-01-02 08:07

    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.

    0 讨论(0)
  • 2021-01-02 08:19

    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')
    0 讨论(0)
提交回复
热议问题