Sometimes I see a pop appears in Eclipse, which is not run in my code. I wanted to know how to fix this error?. How do I get rid of this error
Asked
Active
Viewed 643 times
-4
-
1Possible duplicate of [How to support UTF-8 encoding in Eclipse](https://stackoverflow.com/questions/9180981/how-to-support-utf-8-encoding-in-eclipse) – Ganesh Chowdhary Sadanala Oct 07 '18 at 05:49
1 Answers
1
You seem to be having some Unicode characters, which can't be saved in your default file encoding as your default (e.g. ANSI) might not be able to represent that character. E.g. Characters from Arabic, Hindi, Urdu or even emojis can't be represented in ANSI due to which you need to change the file encoding to UTF-8 after which you will be able to save your file contents successfully and run your program.
For solving this problem,
- click on Windows menu
- Select Preferences
- Expand General by clicking it
- Click on Workspace
- There in bottom left you will see 'Text file encoding'
- By default it might be CP1252, so just change it to UTF-8
- Then you should have no problems saving and running your program.
Let me know if you face any issues.

Pushpesh Kumar Rajwanshi
- 18,127
- 2
- 19
- 36