我用Indy的 TidPOP3 和 CIS的 TclPOP3收取一封信件 头部分如下:
Received: from smtp.user.xunlei.com (unknown [123.129.242.253])
by mx4 (Coremail) with SMTP id IsmowKDb0QMBmhBLwKroLg--.8869S2;
Sat, 28 Nov 2009 11:33:21 +0800 (CST)
Received: from localhost (twin0134 [125.39.72.44])
by smtp.user.xunlei.com (thunder_SMTP) with SMTP id AF03A182F80A
for <[email protected]>; Sat, 28 Nov 2009 11:33:19 +0800 (CST)
MIME-Version:1.0
Content-Type:text/html
To: [email protected]
From: Q8@WSC;'VPPD<[email protected]>
Subject: Q8@W:EBkW"2aH7HO
Date: Sat, 28 Nov 2009 11:33:24 +0800
X-Mailer:By Redhat (PHP/5.2.10)
Message-ID: <[email protected]>
X-CM-TRANSID: IsmowKDb0QMBmhBLwKroLg--.8869S2
X-Coremail-Antispam: (此部分省略)
X-EsetId: F0AE5B205BFC0338AAEA请教一下From和Subject部分具体是什么类型的编码方式
Received: from smtp.user.xunlei.com (unknown [123.129.242.253])
by mx4 (Coremail) with SMTP id IsmowKDb0QMBmhBLwKroLg--.8869S2;
Sat, 28 Nov 2009 11:33:21 +0800 (CST)
Received: from localhost (twin0134 [125.39.72.44])
by smtp.user.xunlei.com (thunder_SMTP) with SMTP id AF03A182F80A
for <[email protected]>; Sat, 28 Nov 2009 11:33:19 +0800 (CST)
MIME-Version:1.0
Content-Type:text/html
To: [email protected]
From: Q8@WSC;'VPPD<[email protected]>
Subject: Q8@W:EBkW"2aH7HO
Date: Sat, 28 Nov 2009 11:33:24 +0800
X-Mailer:By Redhat (PHP/5.2.10)
Message-ID: <[email protected]>
X-CM-TRANSID: IsmowKDb0QMBmhBLwKroLg--.8869S2
X-Coremail-Antispam: (此部分省略)
X-EsetId: F0AE5B205BFC0338AAEA请教一下From和Subject部分具体是什么类型的编码方式
解决方案 »
- 急救,因SQL语句过长,加了加号始终说我语法错误,大师们快快看看啊
- 讨论[关于开辟版块“新手区”的必要性]、拜年、兼散分
- 问一个很菜的问题 别笑!
- 大二进制文件如何安全保存到数据库中(SQL SERVER 2000)
- 登陆系统前播放动画
- Oracle数据库监听和重新安装的问题
- 迷惑了我一天的 问题,我想大家也一定碰到过类似的问题,高手指点一下。
- 怎样实现dbgrid的精确定位,把指针知道特定位置????
- 如何判断一个文件夹中是否有文件存在?若有文件如果将其名字列出?
- 我在win98上新装一个win2000但是装不上,我又不想装了,怎么才能把启动菜单中的“安装win2000。。。。“启动菜单项去掉或不让她在第一位???
- 送分100分:为何一个从DLL中返回的字符串在MEMO中不能正常显示
- 如何把ADOconnection组件的connectionstring字符串写成ini文件?
这没看懂。呵呵。
From: Q8@WSC;'VPPD<[email protected]>
Subject: Q8@W:EBkW"2aH7HO
这两部分我用base64和QP尝试解码,没有任何效果,用UUE和BinHex4以来就要报错,
XXE好像解码也没有什么效果,所以非常迷惑
编码后
From: Q8@WSC;'VPPD <[email protected]>
Subject: Q8@W:EBkW"2aH7HO
编码前
From: 迅雷用户中心 <[email protected]>
Subject: 迅雷号码注册确认
[/code]现在我知道这个编码是7Bit,但是好像跟资料上的编码规范还是有出入,我现在暂时用的每个字符+128补位倒是解决了这个问题,但是这样的话貌似不能对英文字符和标点进行编码了,应该不是我现在解决的办法吧??能不能有更合理的解决办法
*函数名:Base64ToString*
*作者:苏彬*
*时间:2005.11.29 15.25 *
*说明:实现字符转换*
============================}
function Base64ToString(const Value: string): string;
var
x, y, n, l: Integer;
d: array[0..3] of Byte;
Table : string;
begin
Table :=
#$40 +#$40 +#$40 +#$40 +#$40 +#$40 +#$40 +#$40 +#$40 +#$40 +#$3E +#$40
+#$40 +#$40 +#$3F +#$34 +#$35 +#$36 +#$37 +#$38 +#$39 +#$3A +#$3B +#$3C
+#$3D +#$40 +#$40 +#$40 +#$40 +#$40 +#$40 +#$40 +#$00 +#$01 +#$02 +#$03
+#$04 +#$05 +#$06 +#$07 +#$08 +#$09 +#$0A +#$0B +#$0C +#$0D +#$0E +#$0F
+#$10 +#$11 +#$12 +#$13 +#$14 +#$15 +#$16 +#$17 +#$18 +#$19 +#$40 +#$40
+#$40 +#$40 +#$40 +#$40 +#$1A +#$1B +#$1C +#$1D +#$1E +#$1F +#$20 +#$21
+#$22 +#$23 +#$24 +#$25 +#$26 +#$27 +#$28 +#$29 +#$2A +#$2B +#$2C +#$2D
+#$2E +#$2F +#$30 +#$31 +#$32 +#$33 +#$40 +#$40 +#$40 +#$40 +#$40 +#$40; SetLength(Result, Length(Value));
x := 1;
l := 1;
while x < Length(Value) do
begin
for n := 0 to 3 do
begin
if x > Length(Value) then
d[n] := 64
else
begin
y := Ord(Value[x]);
if (y < 33) or (y > 127) then
d[n] := 64
else
d[n] := Ord(Table[y - 32]);
end;
Inc(x);
end;
Result[l] := Char((D[0] and $3F) shl 2 + (D[1] and $30) shr 4);
Inc(l);
if d[2] <> 64 then
begin
Result[l] := Char((D[1] and $0F) shl 4 + (D[2] and $3C) shr 2);
Inc(l);
if d[3] <> 64 then
begin
Result[l] := Char((D[2] and $03) shl 6 + (D[3] and $3F));
Inc(l);
end;
end;
end;
Dec(l);
SetLength(Result, l);
end;
MimeDecodeEx1.DecodeW.SubjectW
你试试,已经解好的