如何在NetBeans 6.9中将编码设置为utf-8? [英] How do you set the encoding to utf-8 in NetBeans 6.9?
问题描述
我正在运行NetBeans 6.9,似乎无法弄清楚在哪里设置编码。我在Google上找到一些指南,但所有这些都是旧版本。
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.
推荐答案
LordofFatality先生的方法不起作用对于通过打开文件菜单打开的项目外文件。
The method by Mr. LordofFatality doesn't work for out-of-project files that you open via 'open file' menu.
为了实现这一点,找到一个 netbeans.conf
文件 netbeans installation\etc\
,找到一个 netbeans_default_options
行并添加有 -J-Dfile.encoding = UTF-8
字符串。
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.
如果您没有找到netbeans_default_options选项,请添加一条全新的行:
If you don't find the "netbeans_default_options" option there, add a whole new line that should read:
netbeans_default_options="-J-Dfile.encoding=UTF-8"
与NetBeans 7.2相关,也可以在7.4中使用
Relevant to NetBeans 7.2, also works in 7.4
PS问题出现了几年,现在有这样的软件是非常奇怪的。或者我只是错过了这个选择,如果是这样,请通知我。
P.S. the problem is present for several years and it's very strange to have such software now. Or I just missed that option, if it's the case, please notify me.
祝你好运。
这篇关于如何在NetBeans 6.9中将编码设置为utf-8?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!