解决 Mac 下 netbeans 中文乱码

Mac: Snow Leopard
Netbeans: Netbeans for PHP 6.8m1

项目内文件编码默认为UTF-8,中文正常。
但 include_path 里的类库(UTF-8)乱码,不管是php doc还是直接打开都不能显示中文。
解决办法如下:

命令行下
vi /Applications/NetBeans/NetBeans 6.8 M1.app/Contents/Resources/NetBeans/etc/netbeans.conf
netbeans_default_options=”…” 加上 -J-Dfile.encoding=UTF-8
看起来像是这样

1
netbeans_default_options="-J-client -J-Xss2m -J-Xms32m -J-XX:PermSize=32m -J-XX:MaxPermSize=200m -J-Dnetbeans.logger.console=true -J-ea -J-Dapple.laf.useScreenMenuBar=true -J-Dsun.java2d.noddraw=true -J-Dfile.encoding=UTF-8"

保存,重启netbeans

问题解决

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
This entry was posted in Uncategory. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>