How do you set the encoding to utf-8 in NetBeans 6.9?
I'm 开发者_Python百科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.
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
In 6.9.1:
- open the project pane if you don't see it already (Window > Projects);
- right-click on the name of your project in the tree-view;
- click properties;
- make sure the menu item "sources" on the left is highlighted;
- you should see "Encoding:" and a select-box next to it;
- click OK. Done.
It SHOULD work that way and does work for anyone on the internet except me. On my Windows XP dev system files are still not saved as UTF-8. Still wondering why ...
open the project pane if you don't see it already (Window > Projects) Right-click on the name of your project in the tree-view click properties make sure the menu item "sources" on the left is highlighted you should see "Encoding:" and a select-box next to it. click ok. done.
it SHOULD work that way and does work for anyone on the internet except me. on my windows xp dev system files are still not saved as utf-8. still wondering why...
Your file should content one or more non-latin chars, this is why.
its bug always the editor saving my files as utf-8 without bom
See here !!!
精彩评论