Change Text file encoding to UTF-8 in Eclipse
I faced the following error dialog message when I tried to save in Eclipse.
Some characters cannot be mapped using "Cp1252" character encoding. Either change the encoding or remove the characters which are not supported by the "Cp1252" character encoding.
It is not compile error nor program error. It is because of Eclipse's Encoding setting.
I noticed I wrote some comment with my native language and it was the main reason of above dialog box.
At first, I tried to save with "Save as UTF-8" button, but all of my comment are broken and cannot be read.
So, the following way can be solve perfectly.
1. Go to (Window -> Preferences) of Eclipse.
2. In Preferences, go to (General -> Workspace) and find "Text file encoding".
3. Select "Other" and choose "UTF-8". And then save the setting by clicking "Apply and Close" button.
4. Done !!!
Comentarios