问题描述
我在两台计算机上使用netbeans 6.1。
I am using netbeans 6.1 on 2 computers.
其中一个程序:
public static void main(String argv[])
{
System.out.println("שלום");
}
正常打印,另一个问号打印。
两种环境之间可能有什么区别?
prints normally, and the on the other question marks.
what can be the difference between the 2 environments?
编辑:两台计算机上的
控制面板\区域和语言选项\高级
设置为希伯来语
编辑:
谢谢Michael Burr,
但编码值已经是UTF-8。
也许是JVM的这个东西?
编辑:
我已经安装了Eclipse,问题就出现了。
我也尝试从具有相同结果的文件中读取希伯来语。
编辑:
System.getProperty(file.encoding);
返回Cp1252
我试过
System.setProperty(file.encoding, UTF-8)
但问号仍然存在。
edit:on both computersControl Panel \ Regional and Language Options \ Advancedis set to hebrew
edit:Thank you Michael Burr,but the value of the encoding is already UTF-8.Maybe this something with the JVM?
edit:I have installed Eclipse and the problem occurs there as well.I also tried reading the hebrew from a file with the same result.
edit: System.getProperty("file.encoding");
returns "Cp1252"I triedSystem.setProperty("file.encoding","UTF-8")
but the question marks remains.
谢谢,
Ido
Thanks,
Ido
推荐答案
确保使用支持希伯来字符的编码设置NetBeans。来自:
Make sure that NetBeans is set up with an encoding that supports Hebrew characters. From the NetBeans Wiki:
- 在项目窗口中右键单击项目节点,然后选择属性。
- 在源下,从编码下拉字段中选择一个编码值。
这篇关于希伯来语在netbeans中出现问号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!