java.io.PrintStream
(OutputStream out, boolean autoFlush, String encoding)
用这个方法,后面可以带编码
string="你要的字符";
byte[] bytes = string.getBytes("GB2312");
outputStream.write(bytes, 0, bytes.length);
PrintStream(outputStream,true,"ISO-8859-1");
这样行不行?
new String(a.getBytes("GBK2312"),"iso-8859-1")
String b = new String(a.getBytes("GBK2312"),"iso-8859-1") ;
Java内建的是unicode和8859的编码,
new String(a.getBytes("GBK2312"),"iso-8859-1")
这样可以,不过要确定Charcater.jar要存在.
就是那个jre要安装多国语言版本,西欧版本是跑不动的.