我用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部分具体是什么类型的编码方式

解决方案 »

  1.   

    From和Subject部分具体是什么类型的编码方式。
    这没看懂。呵呵。
      

  2.   


    From: Q8@WSC;'VPPD<[email protected]>
    Subject: Q8@W:EBkW"2aH7HO
    这两部分我用base64和QP尝试解码,没有任何效果,用UUE和BinHex4以来就要报错,
    XXE好像解码也没有什么效果,所以非常迷惑
      

  3.   

    [code=eMail]
    编码后
    From: Q8@WSC;'VPPD <[email protected]>  
    Subject: Q8@W:EBkW"2aH7HO 
    编码前
    From: 迅雷用户中心 <[email protected]>  
    Subject: 迅雷号码注册确认 
    [/code]现在我知道这个编码是7Bit,但是好像跟资料上的编码规范还是有出入,我现在暂时用的每个字符+128补位倒是解决了这个问题,但是这样的话貌似不能对英文字符和标点进行编码了,应该不是我现在解决的办法吧??能不能有更合理的解决办法
      

  4.   

    BASE64的编码,我是在网上搜的一个转码函数,如果楼下有更好的,分享一下吧{============================   
      *函数名: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;
      

  5.   

    ICS里有
    MimeDecodeEx1.DecodeW.SubjectW
    你试试,已经解好的
      

  6.   

    协议的RTF文档里有详细的说明。