发布附件名自动转Unicode的补丁(测试)
发布该补丁的起源请参考:[url]http://www.extmail.org/forum/viewthread.php?tid=10602[/url]
[url]http://www.extmail.org/forum/viewthread.php?tid=10633[/url]
补丁见附件,使用的是第一个帖子里我提到的方法2,这样所有附件名都自动转称unicode的编码下载,包括tenhlf发现的问题。
这样的做法是不管简体中文,繁体中文,日,韩,泰等文字的附件都统一转称unicode。方便了设计,实际效果也很不错。不过
这个做法和163.com硬性转成gbk等不一样。
[b]使用方法:[/b]
下载补丁并上载到服务器,放到webmail 根目录,执行:
patch -p1 < mime-attach-iconv.patch
然后在简体系统下重新下载有问题的big5附件看看是否ok?:) 谢谢老大对这个问题的重视,补丁已经测试过了,确实不错。extmail系统内部和外部发送过来的带繁体附件的邮件,附件列表和下载对话框都能正常显示了。
不过,之前反映的extmail发送给其他免费邮局,繁体附件列表和下载对话框都乱码的问题还是没有解决哦。:lol Return-Path: <[email]tenhlf@yahoo.cn[/email]>
Delivered-To: [email]demo@ext.dns0755.net[/email]
X-Slockd-Why: blocked by APF::Plugin::greylist
Received: from web92202.mail.cnh.yahoo.com (web92202.mail.cnh.yahoo.com [203.209.250.115])
by cnc-mx.extmail.net (Postfix - by Yizhan Inc.) with SMTP id 19C2ED8007
for <[email]demo@ext.dns0755.net[/email]>; Thu, 21 May 2009 10:28:56 +0800 (CST)
Received: (qmail 77892 invoked by uid 60001); 21 May 2009 02:28:56 -0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.cn; s=s1024; t=1242872936; bh=XEQD/3RLFnowb2zZcRwnFpfnB/8mYwKSxK/f3CkC18A=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=lyRQdSY6Ga7t+sRjDqxhzrU20QfrRjMou9+MOFXuIxuHhLExw9mg4fqxQsOCWL13sJQm8OVsd6voG0XoSsKIJJGf+YxLzwzOxCdlmm0oWyJWvxYpHwGOL/8OfWucE+zu5m3CdTbk5wRpAyomC1L6WLKHQhVAGQ9dH2jjaamebrE=
DomainKey-Signature:a=rsa-sha1; q=dns; c=nofws;
s=s1024; d=yahoo.cn;
h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type;
b=PsY1sRRqhblf3hKPaV2i0eTgPb45HX4O6+sE/y27mYa8KF415uQpssWSEIboZ2iu0zu3v/6QFnN99UlmhJJrPoIddPtHQSzyWYcOBYSyTyOod/VuRglF78b1+zzobHZwjOooJG4ebz00j16H1PClMhdKZTQOz9rmgDHzPfTzZ8I=;
Message-ID: <[email]40332.77273.qm@web92202.mail.cnh.yahoo.com[/email]>
X-YMail-OSG: VnuZQjYVM1m0nA36.HdSNwp.MOkbGEuX4rko0tB8clIhR7MwzRNYpMQyC6JpfDa0BrYIL4Vc8NbMBEfofcSfq8ZAlim3ftVK5YyDQps89xOgT5qIClh7RQ61P37wTiQ9J.XKP5H9JMwzvzKLJR9CSDzB..mPNJCsLqJ.KFPtdhad7WeQ7bfgzlikhCip3RnTcdwHAWIfiWO3M6A-
Received: from [125.70.227.34] by web92202.mail.cnh.yahoo.com via HTTP; Thu, 21 May 2009 10:28:55 CST
X-Mailer: YahooMailClassic/5.2.20 YahooMailWebService/0.7.289.10
Date: Thu, 21 May 2009 10:28:55 +0800 (CST)
From: Chenxi <[email]tenhlf@yahoo.cn[/email]>
Subject: =?utf-8?B?57mB6auU6ZmE5Lu25ris6Kmm?=
To: [email]tenhlf@163.com[/email], [email]tenhlf@sina.com[/email], [email]demo@ext.dns0755.net[/email]
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="0-1262728426-1242872935=:77273"
--0-1262728426-1242872935=:77273
Content-Type: multipart/alternative; boundary="0-1690289559-1242872935=:77273"
--0-1690289559-1242872935=:77273
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
=0A=0A=0A ___________________________________________________________ =
=0A =E5=A5=BD=E7=8E=A9=E8=B4=BA=E5=8D=A1=E7=AD=89=E4=BD=A0=E5=8F=91=EF=BC=
=8C=E9=82=AE=E7=AE=B1=E8=B4=BA=E5=8D=A1=E5=85=A8=E6=96=B0=E4=B8=8A=E7=BA=BF=
=EF=BC=81 =0A[url]http://card.mail.cn.yahoo.com/[/url]
--0-1690289559-1242872935=:77273
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
<table cellspacing=3D"0" cellpadding=3D"0" border=3D"0" ><tr><td valign=3D"=
top" style=3D"font: inherit;"></td></tr></table><br>=0A=0A=0A <hr size=
=3D1><a href=3D"http://cn.rd.yahoo.com/mail_cn/tagline/card/*[url]http://card.ma[/url]=
il.cn.yahoo.com/"> =E5=A5=BD=E7=8E=A9=E8=B4=BA=E5=8D=A1=E7=AD=89=E4=BD=A0=
=E5=8F=91=EF=BC=8C=E9=82=AE=E7=AE=B1=E8=B4=BA=E5=8D=A1=E5=85=A8=E6=96=B0=E4=
=B8=8A=E7=BA=BF=EF=BC=81</a>
--0-1690289559-1242872935=:77273--
--0-1262728426-1242872935=:77273
Content-Type: text/plain; name="=?utf-8?B?57mB6auU6ZmE5Lu2LnR4dA==?="
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="=?utf-8?B?57mB6auU6ZmE5Lu2LnR4dA==?="
wWPF6ar+pfM=
--0-1262728426-1242872935=:77273-- 用繁体系统查看的邮件正文
From: "=?UTF-8?B?RGVtbw==?=" <[email]demo@ext.dns0755.net[/email]>
To: "=?UTF-8?B?dGVuaGxm?=" <[email]tenhlf@163.com[/email]>
Subject: =?UTF-8?B?57mB6auU6ZmE5Lu25ris6Kmm?=
Date: Thu, 21 May 2009 10:36:26 +0800
Mime-version: 1.0
X-Originating-Ip: [221.4.221.54]
X-Mailer: ExtMail 1.1.0
Content-Type: multipart/mixed; charset="UTF-8";
boundary="=_90_24857_1242873386"
Content-Transfer-Encoding: base64
This is a MIME-formatted message. If you see this text it means that your
mail software cannot handle MIME-formatted messages.
--=_90_24857_1242873386
Content-Type: text/html; charset="UTF-8";
Content-Transfer-Encoding: base64
57mB6auU6ZmE5Lu25ris6KmmPEJSPjxCUj4=
--=_90_24857_1242873386
Content-Disposition: attachment; filename="繁體附件.txt"
Content-Type: text/plain; charset="BIG5"; name="繁體附件.txt"
Content-Transfer-Encoding: base64
wWPF6ar+pfM=
--=_90_24857_1242873386--
用简体系统查看的正文
From: "=?UTF-8?B?RGVtbw==?=" <[email]demo@ext.dns0755.net[/email]>
To: "=?UTF-8?B?dGVuaGxm?=" <[email]tenhlf@163.com[/email]>
Subject: =?UTF-8?B?57mB6auU6ZmE5Lu25ris6Kmm?=
Date: Thu, 21 May 2009 10:36:26 +0800
Mime-version: 1.0
X-Originating-Ip: [221.4.221.54]
X-Mailer: ExtMail 1.1.0
Content-Type: multipart/mixed; charset="UTF-8";
boundary="=_90_24857_1242873386"
Content-Transfer-Encoding: base64
This is a MIME-formatted message. If you see this text it means that your
mail software cannot handle MIME-formatted messages.
--=_90_24857_1242873386
Content-Type: text/html; charset="UTF-8";
Content-Transfer-Encoding: base64
57mB6auU6ZmE5Lu25ris6KmmPEJSPjxCUj4=
--=_90_24857_1242873386
Content-Disposition: attachment; filename="�c�����.txt"
Content-Type: text/plain; charset="BIG5"; name="�c�����.txt"
Content-Transfer-Encoding: base64
wWPF6ar+pfM=
--=_90_24857_1242873386-- 个人觉得发送附件的时候做成yahoo的比较好,把它转成utf8
Content-Type: text/plain; name="=?utf-8?B?57mB6auU6ZmE5Lu2LnR4dA==?="
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="=?utf-8?B?57mB6auU6ZmE5Lu2LnR4dA==?=" 感谢lz的建议,我们会考虑一下选择个恰当的办法,目前只解决本系统的读问题,还得让其他系统能正常使用。
考虑会根据偏好设置里,外发邮件是否将编码转成内码或unicode的设置,来决定附件名的编码格式。
页:
[1]