Transfer-Encoding: quoted-printable 如何解?? 一封用foxmail发的信读出的全是 =AA=FD .... 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 MIME定义两种编码方式:Base64与QP(Quote-Printable)。QP的规则是对于资料中的7位无须重复编码,仅将8位的数据转成7位。 QP编码适用于非ASCII码的文字内容,例如我们的中文文件。而Base64的编码规则,是将整个文件重新编码成7位,通常用于传送二进制文件。编码的方式不同会影响编码之后的文件大小。而具有 MIME功能的E-mail软件大都能自动判别你的邮件是采用何种编码,然后自动选择用QP或Base64来解码。 MIME标准现已成为Internet电子邮件的主流。现在最常使用的电子邮件软件Eudora、FoxMail、Netscape Mail、Outlook Express和Internet Mail等都支持MIME编码标准。 int qpdecode(char *s, char *rtnstr){ int pos = 0; char ch, ch1, ch2; unsigned char hz; char tmp[strlen(s) + 1]; char tmp2[10]; memset(tmp, 0, sizeof(tmp)); memset(tmp2, 0, sizeof(tmp2)); for (;;) { ch = s[pos]; if (ch == '\0') break; if (ch == '=') { pos = pos + 1; ch1 = s[pos]; if (ch1 == '\n') { pos = pos + 1; continue; } pos = pos + 1; ch2 = s[pos]; hz = (ch1>'9'?ch1-'A'+10:ch1-'0')*16+(ch2>'9'?ch2-'A'+10:ch2-'0'); sprintf((char *)&tmp2,"%c",hz); strcat((char *)&tmp, (char *)&tmp2); pos = pos + 1; } else { pos = pos + 1; sprintf((char *)&tmp2,"%c",ch); strcat((char *)&tmp, (char *)&tmp2); } } strcpy(rtnstr,tmp); return 0;} 看不懂,我不会C++,没java的么??? 异常处理问题的困惑 JAVA百分号替换如何实现 接受 byte 怎么解析???? 跪求高手 求《优摩登软件公司》的面试题 紧急求助:请问如何解决JAVA socket通信时的connettion reset问题 紧急求助!怎样用java取别人计算机mac地址 关于抽象类及接口我的理解 ArrayBlockingQueue的问题 两个小问题,急,在线等 调查一下,关于 jbuilder6。多多参加,哦,人人得分的问题哦 谁能告诉我borland application server4.5.1 的序列码??? 问题很菜!!!
MIME标准现已成为Internet电子邮件的主流。现在最常使用的电子邮件软件Eudora、FoxMail、Netscape Mail、Outlook Express和Internet Mail等都支持MIME编码标准。
{
int pos = 0;
char ch, ch1, ch2;
unsigned char hz;
char tmp[strlen(s) + 1];
char tmp2[10]; memset(tmp, 0, sizeof(tmp));
memset(tmp2, 0, sizeof(tmp2));
for (;;)
{
ch = s[pos];
if (ch == '\0') break;
if (ch == '=')
{
pos = pos + 1;
ch1 = s[pos];
if (ch1 == '\n')
{
pos = pos + 1;
continue;
}
pos = pos + 1;
ch2 = s[pos];
hz = (ch1>'9'?ch1-'A'+10:ch1-'0')*16+(ch2>'9'?ch2-'A'+10:ch2-'0');
sprintf((char *)&tmp2,"%c",hz);
strcat((char *)&tmp, (char *)&tmp2);
pos = pos + 1;
}
else
{
pos = pos + 1;
sprintf((char *)&tmp2,"%c",ch);
strcat((char *)&tmp, (char *)&tmp2);
}
}
strcpy(rtnstr,tmp);
return 0;
}