,使用indy90组件遇到的问题 收邮件出现'uneven size in decodestream',这问题有人解决过吗 (200分)

G

goodman

Unregistered / Unconfirmed
GUEST, unregistred user!
这都是有用INDYPOP3时遇到的,第一个就是邮件主题是中文时,显示为乱码怎么处理呢,
第二 它把邮件时间显示为不是合法的时间,1899-12-30, 但就是一个是不合法的时间,
其它都正常的,版本是9.14的,收邮件出现'uneven size in decodestream',这问题有
人解决过吗,就是收163信箱里的.

另外啊我的INDYFTP去一个FTP服务器时,其中的名为‘电影目录’的目录里的子目录和
REALPLYER电影都显示不出来的
 
不好意思,不会
呵呵,大家关注关注啊
 
我不懂,邦你顶一下
 
帮你顶啊 呵呵,我也想学习
 
INDY Bug太多,用ICS吧
 
直接用WinSocket吧.
 
我没时间改其它的了呢很急的
 
1.我刚才试了一下,没有乱码阿(D7自带的INDY)
2.同样时间也没有问题。
3.估计你的INDY有问题吧
 
有些中文是正常的呢,有些是不正常的,其实也就是解码有些是不正常的,我现在是解码正常了(用其DECODE组件来解的,),可是下载又不正常了,说什么'uneven size in decodestream '的,真是烦死了,我是在那网上下的最新的INDY来的
 
用它转换一下试试
function CheckTxt(s: string): string;
var
s1,s2,s3: integer;
t,v: string;
Encoding: char;
hex,step: integer;
a1: array[1..4] of byte;
b1: array[1..3] of byte;
j: integer;
byte_ptr,real_bytes: integer;
begin
s1:=Pos('=?',s);
s2:= 1 ;
hex:= 0 ;
if s1>0 then
begin
for s2:=Length(s)-1 downto 1 do
begin
if Copy(s,s2,2)='?=' then Break;
end;
end;
if (s1=0) or (s2=1) then
begin
Result:=s;
Exit;
end;
t:=Copy(s,s1+2,s2-2-s1);
s3:=Pos('?',t);
Delete(t,1,s3);
if(t='')then
begin
Result:= s;
Exit ;
end ;
Encoding:=t[1];
Delete(t,1,2);
v:='';
step:=0;
case Encoding of
'Q':
while t<>'' do
begin
case step of
0:
begin
case t[1] of
'_': v:=v+' ';
'=': step:=1;
else v:=v+t[1];
end;
end;
1:
begin
if t[1]<='9' then hex:=(Ord(t[1])-Ord('0'))*16
else hex:=(Ord(t[1])-55)*16;
step:=2;
end;
2:
begin
if t[1]<='9' then hex:=hex+(Ord(t[1])-Ord('0'))
else hex:=hex+Ord(t[1])-55;
v:=v+Chr(hex);
step:=0;
end;
end;
Delete(t,1,1);
end;
'B':
begin
byte_ptr:=0;
for j:=1 to Length(t) do
begin
Inc(byte_ptr);
case t[j] of
'A'..'Z': a1[byte_ptr]:=Ord(t[j])-65;
'a'..'z': a1[byte_ptr]:=Ord(t[j])-71;
'0'..'9': a1[byte_ptr]:=Ord(t[j])+4;
'+': a1[byte_ptr]:=62;
'/': a1[byte_ptr]:=63;
'=': a1[byte_ptr]:=64;
end;
if byte_ptr=4 then
begin
byte_ptr:=0;
real_bytes:=3;
if a1[1]=64 then real_bytes:=0;
if a1[3]=64 then
begin
a1[3]:=0;
a1[4]:=0;
real_bytes:=1;
end;
if a1[4]=64 then
begin
a1[4]:=0;
real_bytes:=2;
end;
b1[1]:=a1[1]*4+(a1[2] div 16);
b1[2]:=(a1[2] mod 16)*16+(a1[3]div 4);
b1[3]:=(a1[3] mod 4)*64 +a1[4];
if(real_bytes>0)then
v:= v + chr(b1[1]) ;
if(real_bytes>1)then
v:= v + chr(b1[2]) ;
if(real_bytes>2)then
v:= v + chr(b1[3]) ;
end;
end;
end;
end;
Result:=Copy(s,1,s1-1)+v+Copy(s,s2+2,999);
end;
这是我在这儿找到一段代码
 
顶部