Reputation: 313
I am trying to open a class under a project and i keep getting the same error: Creation of element failed. Reason: Cp65001.
I understood it has to do something with JDK version. So, I downloaded the eclipse update to java 13, as followed here: Java 13 support for eclipse
and also tried out all the suggestion in the link below: How to change JDK version for an Eclipse project
I don't know what else i can do. Is it recommended to use Java 11?
Thank you for your help
Upvotes: 0
Views: 1702
Reputation: 159086
Cp65001
is the Windows way of saying UTF-8, so it seems you're running on Windows, and that you changed the default character set to "code page 65001", and that Java / Eclipse cannot handle it.
Update the Eclipse settings to explicitly select UTF-8, by selecting pull-down menu Window
> Preferences
, selecting node General
> Workspace
and changing the Text file encoding
to Other: UTF-8
If you then right-click your project and select Properties
, select node Resource
, you should see Text file encoding
having value Inherited from container (UTF-8)
. You can change it here on a project-by-project basis, instead of the global setting in the Preferences dialog, if you so choose.
Upvotes: 3