社区
非技术区
帖子详情
谁有邮件内容解码函数MimeDecodeString吗!我给100分!!!
shenxp_2002
2002-03-06 02:34:15
我做了个邮件收发程序,在用这个程序发送和接收没问题,但用OutLook发送后(uft-8格式),用这个程序接收有邮件内容部分乱码现象。经调试后发现是调用MimeDecodeString函数解码后,开始出现乱码现象。这个MimeDecodeString函数是我网上下载的,我怀疑有问题。你有这个函数吗???我的Eamil是shenxp2002@163.com,
...全文
40
4
打赏
收藏
谁有邮件内容解码函数MimeDecodeString吗!我给100分!!!
我做了个邮件收发程序,在用这个程序发送和接收没问题,但用OutLook发送后(uft-8格式),用这个程序接收有邮件内容部分乱码现象。经调试后发现是调用MimeDecodeString函数解码后,开始出现乱码现象。这个MimeDecodeString函数是我网上下载的,我怀疑有问题。你有这个函数吗???我的Eamil是shenxp2002@163.com,
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
4 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
maxsuy
2002-04-30
打赏
举报
回复
2323
alittlefrag
2002-04-04
打赏
举报
回复
const
BaseTable:string='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
......
function FindInTable(CSource:char):integer;
begin
result:=Pos(string(CSource),BaseTable)-1;
end;
function DecodeBase64(Source:string):string;
var
SrcLen,Times,i:integer;
x1,x2,x3,x4,xt:byte;
begin
result:='';
SrcLen:=Length(Source);
Times:=SrcLen div 4;
for i:=0 to Times-1 do
begin
x1:=FindInTable(Source[1+i*4]);
x2:=FindInTable(Source[2+i*4]);
x3:=FindInTable(Source[3+i*4]);
x4:=FindInTable(Source[4+i*4]);
x1:=x1 shl 2;
xt:=x2 shr 4;
x1:=x1 or xt;
x2:=x2 shl 4;
result:=result+chr(x1);
if x3= 64 then break;
xt:=x3 shr 2;
x2:=x2 or xt;
x3:=x3 shl 6;
result:=result+chr(x2);
if x4=64 then break;
x3:=x3 or x4;
result:=result+chr(x3);
end;
end;
//Base64±àÂë·½·¨
function EncodeBase64(Source:string):string;
var
Times,LenSrc,i:integer;
x1,x2,x3,x4:char;
xt:byte;
begin
result:='';
LenSrc:=length(Source);
if LenSrc mod 3 =0 then Times:=LenSrc div 3
else Times:=LenSrc div 3 + 1;
for i:=0 to times-1 do
begin
if LenSrc >= (3+i*3) then
begin
x1:=BaseTable[(ord(Source[1+i*3]) shr 2)+1];
xt:=(ord(Source[1+i*3]) shl 4) and 48;
xt:=xt or (ord(Source[2+i*3]) shr 4);
x2:=BaseTable[xt+1];
xt:=(Ord(Source[2+i*3]) shl 2) and 60;
xt:=xt or (ord(Source[3+i*3]) shr 6);
x3:=BaseTable[xt+1];
xt:=(ord(Source[3+i*3]) and 63);
x4:=BaseTable[xt+1];
end
else if LenSrc>=(2+i*3) then
begin
x1:=BaseTable[(ord(Source[1+i*3]) shr 2)+1];
xt:=(ord(Source[1+i*3]) shl 4) and 48;
xt:=xt or (ord(Source[2+i*3]) shr 4);
x2:=BaseTable[xt+1];
xt:=(ord(Source[2+i*3]) shl 2) and 60;
x3:=BaseTable[xt+1];
x4:='=';
end else
begin
x1:=BaseTable[(ord(Source[1+i*3]) shr 2)+1];
xt:=(ord(Source[1+i*3]) shl 4) and 48;
x2:=BaseTable[xt+1];
x3:='=';
x4:='=';
end;
result:=result+x1+x2+x3+x4;
end;
end;
forgot2000
2002-03-06
打赏
举报
回复
sakemail、icserver也可以。
forgot2000
2002-03-06
打赏
举报
回复
用这个控件试试http://202.96.70.228/cakk/delphi/vcl_CoolmailReleaseVer.zip
Synapse TCP/IP Library v24一套通信类和
函数
库
Synapse TCP/IP Library具有以下特点: Synapse不是控件,而是一套类和
函数
库,因此不需要任何安装; Synapse支持Windows下的Delphi、CBuilder和Linux下的Kylix; 支持Winsock或基于阻塞模式的Libc通讯,支持TCP、UDP、ICMP和RAW协议; 支持ASN.1编码和
解码
; 支持DNS; 支持标准ISO编码(ISO-8859-x),Windows编码(CP-125x),KOI8-R和Unicode(UCS-4, UCS-2, UTF-7 and UTF-8); 支持
MIME
编码和
解码
(包括字符转换); 支持SMTP和ESMTP协议 支持HTTP 0.9、1.0和1.1协议; 支持SNMP协议; 支持NTP和SNTP协议; 支持POP3协议; 支持Base64和Quoted-pritable编码与
解码
; 支持UUCode和XXCode
解码
; ………… 完整功能. 源代码: 有 适用于 CB3 CB4 CB5 D2 D3 D4 D5 D6 K1
python--编码与
解码
函数
parse模块--urlencode
函数
quote
函数
parse_qs
函数
decode
一.编码1.urlencode
函数
1.介绍2.代码块3.输出结果2.quote
函数
1.介绍2.代码块3.输出结果二.
解码
1.parse_qs
函数
1.介绍2.代码块3.输出结果2.
decode
()1.介绍2.代码块3.输出结果 parse模块–urlencode
函数
quote
函数
parse_qs
函数
decode
() 一.编码 1.urlencode
函数
1.介绍 urlencode
函数
可以把字典中的数据转化为U
【Python爬虫历程】urllib库之编码
函数
以及
解码
函数
:
urlencode(编码)
函数
以及urlencode(
解码
)
函数
是位于urllib库下面的parse模块下面的
函数
,一个用来编码一个用来
解码
。 一、urlencode 在url中如果出现一些中文或者字符,url不识别的,则需要进行转换,使用urllib库中的urlencode
函数
,可以把key-value这样的键值对转换成我们想要的格式,返回的是a=1&b=2这样的字符串,比...
python-base58编码与
解码
函数
为加深对base58的理解,编写了base58的编码
函数
和
解码
函数
def base58_
decode
(cipher_input: str) -> str: """ base58编码典型应用是比特币钱包,与base64相比,去除了0、I、O、l、/ +等不易辨认的6个字符 :param cipher_input: 输入base58编码值 :return: base58的
解码
值 @author hongfeiyinxue 2022-04-30-1651329023
js
解码
函数
escape,encodeURI,encodeURIComponent比较
js对文字进行编码涉及3个
函数
:escape,encodeURI,encodeURIComponent,相应3个
解码
函数
:unescape,
decode
URI,
decode
URIComponent1、 传递参数时需要使用encodeURIComponent,这样组合的url才不会被#等特殊字符截断。 例如:document.write(退
非技术区
830
社区成员
53,573
社区内容
发帖
与我相关
我的任务
非技术区
Delphi 非技术区
复制链接
扫一扫
分享
社区描述
Delphi 非技术区
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章