Topic: 请教有没有java把gb码转成utf8的东东? |
Print this page |
1.请教有没有java把gb码转成utf8的东东? | Copy to clipboard |
Posted by: 老妖 Posted on: 2002-12-19 18:03 比如html我想把html里的gb码转成utf-8但html的tag不要转,能不能做到呢?谢谢啦 |
2.Re:请教有没有java把gb码转成utf8的东东? [Re: 老妖] | Copy to clipboard |
Posted by: 老妖 Posted on: 2002-12-20 12:53 谢谢,,研究一下咯。。 |
3.Re:请教有没有java把gb码转成utf8的东东? [Re: 老妖] | Copy to clipboard |
Posted by: floater Posted on: 2002-12-20 13:00 Java sample: OutputStreamWriter out = new OutputStreamWriter(System.out, "UTF8"); copied from somewhere, |
4.Use ANt! [Re: floater] | Copy to clipboard |
Posted by: youlq Posted on: 2002-12-20 15:03 我用下面的这两个ANT target 脚本,编码,拷贝,打包,一次搞定。很方便的。 <target name="encode_res" depends="prepare"> <delete dir="${build.classes.res}"/> <mkdir dir="${build.classes.res}"/> <native2ascii encoding="GB2312" src="${src.res}" dest="${build.classes.res}" includes="**/*.properties" /> <copy todir="${build.classes.res}"> <fileset dir="${src.res}"/> </copy> </target> <target name="jar_res" depends="encode_res"> <mkdir dir="${build.dist}"/> <jar destfile="${build.dist}/resource.jar" basedir="${build.classes.res}" /> </target> |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |