Monday, 26 September 2016

Character encoding in Eclipse

In an Eclipse workspace, files, folders, projects can have individual encoding. But typically by default the encoding is derived from the platform default settings. One can check the same by right clicking on the project-->Properties-->select Resource as shown in below from the dialog.
However, one can change the default settings to your desired encoding for the entire project by selecting the other radio button as shown above, now from the Combo box, you can select your desired encoding and then click Apply. Now this settings will be stored inside the hidden file in the project .settings/org.eclipse.core.resources.prefs. The hidden file will have a entry like as shown below

One can set the encoding at the specific folder level as well by selecting the particular folder in the project and follow the same instructions. Now contents will be shown as below

As already said, we can set the encoding to files as well

In most of the scenarios, we usually set encoding at the project level and the same will be guarded throughout the project

No comments:

Post a Comment