在我的java项目中,我需要使用阿拉伯语文本和字符串,但文本变得像"???????"
,那么错误是什么?以及如何解决这个问题?
感谢
答案 0 :(得分:35)
您可以使用启动选项设置Netbeans
将其放在netbeans.conf
netbeans_default_options
内
-J-Dfile.encoding=UTF-8
最后看起来应该是
netbeans_default_options="..... -J-Dfile.encoding=UTF-8"
希望它能帮到你
答案 1 :(得分:3)
以下是将Netbeans中的默认字符集设置为UTF-8(在Windows中)的说明:
1 Go to C:\Program Files\netbeans-x.x\etc
2 Open netbeans.conf in Notepad.
3 On the netbeans_default_options add: -J-Dfile.encoding=UTF-8. (make sure to put it within the quotation marks)
4 Project properties -> Build -> Compiling ->
Additional compiler options) text box.- add: -encoding UTF-8
5 You can also check to make sure that you have increased the memory allocation for Netbeans by looking at the netbeans_default_options line. The default max is 128MB. We have increased this to 256MB.
答案 2 :(得分:3)
Ubuntu go目录 恩。
sudo gedit /usr/local/netbeans-8.0/etc/netbeans.conf
添加
netbeans_default_options =" -J-指定-Dfile.encoding = UTF-8"
保存Fin
答案 3 :(得分:1)
请遵循以下问题,以解决如何在Netbeans中对UTF 8 Dari,Pashto,波斯和阿拉伯语提供支持