How To Display UTF8 In Netbeans 7,8?

心不动则不痛 提交于 2019-11-27 12:56:33

问题


In my java project, I need to use Arabic text and strings, but the text becomes like "???????" , so what wrong ? and how to resolve this problem?

thanks


回答1:


You can setup your Netbeans with startup option
place it inside netbeans.conf into netbeans_default_options

-J-Dfile.encoding=UTF-8

In the end it should look like

netbeans_default_options="..... -J-Dfile.encoding=UTF-8"

Hope it'll help you




回答2:


Here are instructions for setting the default character set in Netbeans to UTF-8 (in 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. 



回答3:


Ubuntu go directory ex.

sudo gedit /usr/local/netbeans-8.0/etc/netbeans.conf

Add

netbeans_default_options="-J-Dfile.encoding=UTF-8"

Save Fin




回答4:


Please follow the bellow issue to solve the how to UTF 8 Dari, Pashto, Persian and Arabic Support in Netbeans

  1. open the C:\Program Files\NetBeans 8.0.2\etc PAT form windows
  2. than copy the netbeans.conf into your some place in your computer
  3. add the -J-Dfile.encoding=UTF-8 inside netbeans_default_options=
  4. like bellow code
  5. netbeans_default_options="-J-Dfile.encoding=UTF-8 -J-client -J-Xss2m -J-Xms32m -J- XX:PermSize=32m -J-Dapple.laf.useScreenMenuBar=true -J-Dapple.awt.graphics.UseQuartz=true -J-Dsun.java2d.noddraw=true -J-Dsun.java2d.dpiaware=true -J-Dsun.zip.disableMemoryMapping=true"
  6. than replace the file into C:\Program Files\NetBeans 8.0.2\etc
  7. now close the netbeans and reopen it, so it work all language like Dari, Pashto, Persian, Arabic and etc...


来源:https://stackoverflow.com/questions/5922845/how-to-display-utf8-in-netbeans-7-8

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!