中文问题!急
程序写的代码,输出到客户那成了Á×®¿Ïꤤ®êÉÉÞ¤¤«
客户说no shift-in (x '0E) /shift-out (x '0F ') between chinese characters.
怎么解决呢?
[解决办法]
看不懂啊 帮顶
[解决办法]
1.在你发出之前是不是乱码?(可以debug看一下)
2.他是在中国吗?(需要安装语言包)
3.他的浏览(解析)编码有选对吗?(客户右键点击页面选择编码)
[解决办法]
BepsKnowledgebase base = new BepsKnowledgebase();
List list = base.getKnowledgeList(this.getEngine().getSqlMap());
Iterator iter = list.iterator();
try
{
Writer writer = new OutputStreamWriter(new FileOutputStream(getPath()+ "ExpBank.out.txt "), "GBK ");
//FileWriter fw = new FileWriter(getPath()+ "ExpBank.out.txt ");
//PrintWriter out = new PrintWriter(fw);
while(iter.hasNext()){
Map map = (Map)iter.next();
String tmp = BepsHelper.rFill((String)map.get( "BANK_CODE "),12,BepsConstant.FILL_SPACE)
+ BepsHelper.rFill((String)map.get( "DIRECT_PARTICIPANT_CODE "),12,BepsConstant.FILL_SPACE)
+ BepsHelper.rFill((String)map.get( "BRANCH_CODE "),4,BepsConstant.FILL_SPACE)
+ BepsHelper.rFill((String)map.get( "FULL_NAME "),60,BepsConstant.FILL_SPACE)
+ BepsHelper.rFill((String)map.get( "ADDRESS "),60,BepsConstant.FILL_SPACE)
+ BepsHelper.rFill((String)map.get( "POSTCODE "),6,BepsConstant.FILL_SPACE)
+ BepsHelper.rFill((String)map.get( "PHONE_NUM "),20,BepsConstant.FILL_SPACE)
;
writer.write(tmp);
writer.write( "\n ");
writer.flush();
}
writer.close();
}
catch(IOException e)
{
e.printStackTrace();
}
}
[解决办法]
估计是客户端浏览器的解码有问题
[解决办法]
java中文乱码问题一些解决方案和经验(转)
http://www.javaeye.com/topic/108894
[解决办法]
把“gbk” 改成“Default”试一下 我只是提个介意
帮lz想多点方法
[解决办法]
如果服务器已经搞定中文,看看客户端的编码.
[解决办法]
request.setCharacterEncoding( "GBK ");
response.setCharacterEncoding( "GBK ");
加过滤里