ºìÁªLinuxÃÅ»§
Linux°ïÖú

java³ÌÐòÔÚlinuxÏÂдÖÐÎÄ×ÜÊÇ´æ³Éutf-8µÄÎÊÌâ

·¢²¼Ê±¼ä:2008-03-16 10:15:24À´Ô´:ºìÁª×÷Õß:chaian
linux주

title = (new String(title.getBytes("ISO8859_1"),"gbk")).trim();

FileWriter fw = new FileWriter(filename,false);
fw.write(title);
fw.close();

Õâ¾äÊÇû´í£¬µ«ÊÇֻҪһдÈëÎı¾×ÜÊÇ×Ô¶¯»á±ä³Éutf-8¸ñʽµÄÎļþ£¬ÈÃÈ˺ܲ»Ë¬£¡

ÆäʵÊÇÒòΪlinux½â²Ù×÷ϵͳ¶ÔJVMȱʡ±àÂ뷽ʽµÄÓ°Ï죬ӢÎĵÄlinuxĬÈÏÊDz»Ö§³ÖÖÐÎĵġ£Òò´ËÎÒÃDZØÐëÈÃËüÏÈÖ§³Ö£¬ÔÚShellÖÐÊäÈ룺

LANG=zh_CN
LC_ALL=zh_CN.GBK
export LANG LC_ALL

ÔÙjavac , ÏÖÔÚOKÁË°É£¡
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 0 ÌõÆÀÂÛ