How do you set the encoding to utf-8 in NetBeans 6.9?

encoding, netbeans

Solution

The method by Mr. LordofFatality doesn't work for out-of-project files that you open via 'open file' menu.

In order to accomplish that, find a `netbeans.conf` file in you `netbeans installation\etc\`, find there a `netbeans_default_options` line and add there `-J-Dfile.encoding=UTF-8` string.

If you don't find the "netbeans_default_options" option there, add a whole new line as following:

netbeans_default_options="-J-Dfile.encoding=UTF-8"

Relevant to NetBeans 7.2, also works in 7.4

Problem

I'm running NetBeans 6.9, can't seem to figure out where to set the encoding. I found some guides on google but all of them were for older versions.

Original source