codecamp

我的Nutz的源码是乱码怎么办?

问题的提出

采用的是 nutz-source.jar 的方式存放源码

Ecipse 用户

打开

window > Preferebces > General > Workspace

看看 "Text file encoding" 项是不是设成 "UTF-8" 了 还是不行? 请重启你的Eclipse

全局UTF-8设置, 打开eclipse.ini,在末尾加入

      -Dfile.encoding=UTF-8

建议同时在windows/linux下使用的童鞋使用全局设置,避免部署时编码问题导致的问题

Netbean 用户

  1. 找到你的Netbeans安装目录下的etc文件夹,如C:Program FilesNetBeans 6.0 M9etc
  2. 用记事本打开netbeans.conf
  3. 找到netbeans_default_options这一句(没带#号的,带#号的是注释)
  4. 在最后面加上一个空格,再加入-J-Dfile.encoding=UTF-8

比如:

netbeans_default_options="
    -J-DAM_CONFIG_FILE=\"C:\Sun\AppServer\domains\domain1\config\AMConfig.properties\" 
    -J-Dcom.sun.aas.installRoot=\"C:\Sun\AppServer\" 
    -J-Xms128m 
    -J-Xmx512m 
    -J-XX:PermSize=32m 
    -J-XX:MaxPermSize=160m 
    -J-Dapple.laf.useScreenMenuBar=true 
    -J-XX:+UseConcMarkSweepGC 
    -J-XX:+CMSClassUnloadingEnabled 
    -J-XX:+CMSPermGenSweepingEnabled 
    -J-Dfile.encoding=UTF-8
"
Nutz 该如何发音
案例
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

表达式引擎

maplist结构

图像处理小军刀

关闭

MIP.setData({ 'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false}, 'pageFontSize' : getCookie('pageFontSize') || 20 }); MIP.watch('pageTheme', function(newValue){ setCookie('pageTheme', JSON.stringify(newValue)) }); MIP.watch('pageFontSize', function(newValue){ setCookie('pageFontSize', newValue) }); function setCookie(name, value){ var days = 1; var exp = new Date(); exp.setTime(exp.getTime() + days*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + exp.toUTCString(); } function getCookie(name){ var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)'); return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null; }