我读取eml文件的时候。用base64解密。。发现部分解不了。
解不了的:
VGhpbmtQYWTlpJrmrL7pvKDmoIfvvIzkvJjmg6DpgInotK3vvIHng63nur/lkqjor6IwMTAtODg1NzEwODYgfEFE?=
解出来的中文有乱码:
ThinkPad澶氭榧犳爣锛屼紭鎯犻€夎喘锛佺儹绾垮挩璇?10-88571086 |AD但是用outlook打开eml文件。里面的内容是完全可见。。
用outlook打开如下:
ThinkPad多款鼠标,优惠选购!热线咨询010-88571086 |AD求解我找遍了base64的算法都解不了下面的能解。
RWNsaXBzZdauuLjP1sntSUJNyO28/rS00MLC28yzKEFEKQ==?=解出来的:
Eclipse之父现身IBM软件创新论坛(AD)
小弟新手。没什么分。现在挣分去了。。所有分都砸上来附eml文件:Return-path:<[email protected]>
Received: from <mx3-26.sinamail.sina.com.cn>([<202.108.3.242>])
 by <mail234-183.sinamail.sina.com.cn> (Postfix) with LMTP id <33651>
 Aug 11 2010 06:32:00 +0800 (CST)
Received: from irxd5-171.sinamail.sina.com.cn (unknown [10.55.5.171])
by mx3-26.sinamail.sina.com.cn (Postfix) with ESMTP id C92CA7EE2DA
for <[email protected]>; Wed, 11 Aug 2010 06:31:58 +0800 (CST)
Received-SPF: None identity=mailfrom; client-ip=203.81.25.242;
  receiver=irxd5-171.sinamail.sina.com.cn;
  envelope-from="[email protected]";
  x-sender="[email protected]";
  x-conformance=spf_only
Received: from 203-81-25-242.net-infinity.net (HELO mail.allbest.cn) ([203.81.25.242])
  by irxd5-171.sinamail.sina.com.cn with ESMTP; 11 Aug 2010 06:31:47 +0800
Received: from localhost (unknown [203.81.25.242])
by mail.allbest.cn (Postfix) with SMTP id 932A7125DAE
for <[email protected]>; Tue, 10 Aug 2010 10:59:43 +0800 (CST)
MIME-Version:1.0
Content-Type:text/html;charset="GB2312"
To: [email protected]
From: "=?utf-8?B?VGhpbmtXb3JsZA==?=" <[email protected]>
Subject: =?utf-8?B?VGhpbmtQYWTlpJrmrL7pvKDmoIfvvIzkvJjmg6DpgInotK3vvIHng63nur/lkqjor6IwMTAtODg1NzEwODYgfEFE?=
Date: Tue, 10 Aug 2010 10:59:43 +0800
Message-ID: <[email protected]><html>
<head>
<title>ThinkWorld--ThinkPad 多款鼠标,优惠选购</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!-- .STYLE1 {font-size: 12px} .STYLE4 {color: #006699}
-->
</style>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="740" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF">
  <tr>
    <td height="10" valign="middle"></td>
  </tr>
  <tr>
    <td height="20" valign="middle" align="center"><span class="STYLE1">如果您的页面无法正常显示,请<a href="http://edm.allsmart.com.cn/edmurl.php?url=NjA4JiZodHRwOi8vZWRtLnRoaW5rd29ybGQuY29tLmNuLzIwMTAwODA2Lw%3D%3D&pv=OTk0NTFjNTk1NDA4ZTA1ZWFmZWM0MjdlOWUzMzNlODk=&em=c2NweXNAc2luYS5jb20%3D" target="_blank"><font color="#FF0000">点击这里</font></a></span></td>
  </tr>
  <tr>
    <td height="32" align="right" class="STYLE1">此邮件为系统发送,请勿直接回复。</td>
  </tr>
</table>
</body>
</html>

解决方案 »

  1.   

    你的解码本身没错,只是解码之后的数据是 UTF-8 格式的,不是 GBK 格式的,需要转换一下。
      

  2.   

    他在后面加了?=作为结束哎~~
    你把解码出来的UTF-8转成ANSI的~~~
      

  3.   

    //54 68 69 6E 6B 50 61 64 E5 A4 9A E6 AC BE E9 BC A0 E6 A0 87 EF BC 8C E4 BC 98 E6 83 A0 E9 80 89 E8 B4 AD EF BC 81 E7 83 AD E7 BA BF E5 92 A8 E8 AF A2 30 31 30 2D 38 38 35 37 31 30 38 36 20 7C 41 44 00 00 00 
    ThinkPad多款鼠标,优惠选购!热线咨询010-88571086 |ADutf8而已
      

  4.   

    char   str   [   256   ]   =   {0xE4,0xBD,   0xA0,     0xE5   ,0xA5   ,0xBD,   0x61,   0x62   ,0x63,0}   ;     //一段UTF-8编码                   WCHAR*   strA;                   int   i=   MultiByteToWideChar   (   CP_UTF8   ,   0   ,(char*)   str   ,-1   ,NULL,0);                   strA   =   new   WCHAR[i];                   MultiByteToWideChar   (   CP_UTF8   ,   0   ,(   char   *   )   str,   -1,   strA   ,   i   );                   i=   WideCharToMultiByte(CP_ACP,0,strA,-1,NULL,0,NULL,NULL);                   char   *strB=new   char[i];                   WideCharToMultiByte   (CP_ACP,0,strA,-1,strB,i,NULL,NULL); //strB即为所求                   delete   []strA;                   delete   []strB;
      

  5.   

    善用google,是utf-8编码的,解出来是
    ThinkPad多款鼠标,优惠选购!热线咨询010-88571086 |AD
    参考网址:www.mxcz.net/tools/base64.aspx