您如何在 NetBeans 6.9 中将编码设置为 utf-8? [英] How do you set the encoding to utf-8 in NetBeans 6.9?
问题描述
我正在运行 NetBeans 6.9,似乎无法弄清楚在哪里设置编码.我在谷歌上找到了一些指南,但都是针对旧版本的.
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 installationetc
中找到一个 netbeans.conf
文件,在那里找到一个 netbeans_default_options
行和在那里添加 -J-Dfile.encoding=UTF-8
字符串.
In order to accomplish that, find a netbeans.conf
file in you netbeans installationetc
, 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 as following:
netbeans_default_options="-J-Dfile.encoding=UTF-8"
与 NetBeans 7.2 相关,也适用于 7.4
Relevant to NetBeans 7.2, also works in 7.4
这篇关于您如何在 NetBeans 6.9 中将编码设置为 utf-8?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!