如何更改 NetBeans 8.0 中的默认编码 [英] How to change default encoding in NetBeans 8.0
问题描述
我想知道我是否可以更改 NetBeans 8.0 中的默认编码......我搜索了很多,但我还没有找到如何在此版本的 NetBeans 中更改编码的方法.
我的 html 文档中有这个标签:
但是!正如您在附加图片中看到的那样,NetBeans 通知警告我存在编码问题.
<块引用>内部编码声明utf-8"不同意文档的实际编码(windows-1250").
我通过新文件"创建了 index.htmlNetBeans 中的函数.项目属性里有UTF-8编码,所以我觉得应该是UTF-8.我真的不知道那个windows-1250"是从哪里来的!!
在哪里可以找到一些选项来更改 NetBeans 8.0 中的默认编码甚至当前文件编码?
导航到
并打开 netbeans.conf
文件.
在以 netbeans_default_options
开头的行的末尾添加 -J-Dfile.encoding=UTF-8
(确保包含前导空格).>
重启 Netbeans,它应该是 UTF-8
要验证去help ->about
并检查 System: Windows Vista version 6.0 running on x86;UTF-8;nl_NL (nb)
I'm wondering if I can change default encoding in NetBeans 8.0... I searched a lot but I haven't find a way how to change the encoding in this version of NetBeans.
I have this tag in my html document:
<meta charset="utf-8">
BUT! As you can see on attached image, NetBeans notice is warning me about an encoding problem.
Internal encoding declaration "utf-8" disagrees with the actual encoding of the document ("windows-1250").
I created index.html by "new file" function in NetBeans. There is UTF-8 encoding in project properties, so I think it should be UTF-8. I really don't know where that 'windows-1250' came from!!
Where I can find some option to change default encoding or even current file encoding in NetBeans 8.0?
Navigate to
<Netbeans installation directory>/etc
and open thenetbeans.conf
file.Add
-J-Dfile.encoding=UTF-8
at the end of the line that starts withnetbeans_default_options
(make sure to include the leading space).Restart Netbeans and it should be in UTF-8
To verify go to
help -> about
and check System:Windows Vista version 6.0 running on x86; UTF-8; nl_NL (nb)
这篇关于如何更改 NetBeans 8.0 中的默认编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!