Friday, 29 November 2013

Changing the encoding of a currently edited file in NetBeans is not possible. In NetBeans all files of a project should have the same encoding. TO convert all files of a project to same encoding use another tool.

Project specific file encoding

To set a project specific encoding, right click on a project (in Project View) and choose "Properties" from the context menu. Under "Sources" you can set the encoding in the dropdown field "Encoding".

Default file encoding

To set default file encoding in NetBeans, go to NetBeans installation directory and edit "etc/netbeans.conf".
Add the option "-J-Dfile.encoding=UTF-8" to "netbeans_default_options":
netbeans_default_options="-J-Dfile.encoding=UTF-8 ..."
Restart NetBeans and the default encoding should be UTF-8. Check this under "Help - About":


  1. This article is excellent and clearly explain how to change all types of projects to encoding used by beans Web Development Services | Mobile Application - Digital Pursuit

  2. I really appreciate information shared above. It’s of great help. If someone want to learn Online (Virtual) instructor lead live training in Netbeans, kindly contact us
    MaxMunus Offer World Class Virtual Instructor led training on Netbeans. We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ trainings in India, USA, UK, Australlia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.
    For Demo Contact us.
    Nitesh Kumar
    Skype id: nitesh_maxmunus
    Ph:(+91) 8553912023