iconv

iconv -f 源字符集 -t 目标字符集 文件名

iconv   -f UTF-8 -t GBK  success.msg

[root@perass ~]# cat success.msg | tail -20
?..?..绠$.??[QMUMBFEFZ],?..?..:[MSGMBFE_1]
棣.?..?..?..:[MSGTO3310A_1],澶.敞:[]
U澶翠俊?.[?.
?ユ.?..:
{H:01313338707013IBPS0000        IBPS20140115091700XMLccms.990.001.01     2013120302100865    2013120302100865    3U1      X }
<?xml version="1.0" encoding="UTF-8"?>
<Document xmlns="urn:cnaps:std:ibps:2010:tech:xsd:ccms.990.001.01">
 <ComuCnfm>
  <OrigSndr>0000</OrigSndr>
  <OrigSndDt>20140115</OrigSndDt>
  <MsgTp>saps.601.001.01</MsgTp>
  <MsgId>2013042650004009</MsgId>
  <MsgRefId>20302100863</MsgRefId>
  <MsgProCd>0000</MsgProCd>
 </ComuCnfm>
</Document>


[root@perass ~]# iconv -f UTF-8 -t GBK success.msg | tail -20
本地队列管理器:[QMUMBFEFZ],本地队列:[MSGMBFE_1]
首选发送队列名:[MSGTO3310A_1],备注:[]
U头信息:[无]
报文内容:
{H:01313338707013IBPS0000        IBPS20140115091700XMLccms.990.001.01     2013120302100865    2013120302100865    3U1      X }
<?xml version="1.0" encoding="UTF-8"?>
<Document xmlns="urn:cnaps:std:ibps:2010:tech:xsd:ccms.990.001.01">
 <ComuCnfm>
  <OrigSndr>0000</OrigSndr>
  <OrigSndDt>20140115</OrigSndDt>
  <MsgTp>saps.601.001.01</MsgTp>
  <MsgId>2013042650004009</MsgId>
  <MsgRefId>20302100863</MsgRefId>
  <MsgProCd>0000</MsgProCd>
 </ComuCnfm>
</Document>

你可能感兴趣的:(iconv)