�在 Base64 编码的电子邮件中
我在使用瑞典语 + MS Outlook 时遇到问题。
除了 MS Outlook 之外,它在任何地方都运行良好。在 MS Outlook 中,瑞典语字符显示为 �。电子邮件内容采用 base64 编码、uft-8 等。可能有什么问题?
附录:
这是消息:
============================================================
Header
============================================================
*** NY Beställning ***
Ni har fått ny beställning från: FirstAccount
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Beställnings-ID: FA12914-1
Beställningsdetaljer: http://somelink
Beställningsdatum: 11/14/2011 11:16
Önskat leveransdatum:
Ordersedel: http://somlink
Original: <http://somelink>
Product: New stuff
Product ID:
Description:
Qty: 11
Job type: Release from stock
Kommenar: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_______________________________________________________________
Copyright (c) 2011 Someone
这是来源:
Return-path: <[email protected]>
Envelope-to: [email protected]
Delivery-date: Mon, 14 Nov 2011 11:17:00 +0000
Received: from somewhere ([123.456.789.012])
by someone.co.uk with esmtp (Exim 4.69)
(envelope-from <[email protected]>)
id 1RPuX1-0006sU-HG
for [email protected]; Mon, 14 Nov 2011 11:16:58 +0000
Received: by someone.co.ul (Postfix, from userid 33)
id B743C4EB7F; Mon, 14 Nov 2011 11:16:52 +0000 (UTC)
To: "Admin" <[email protected]>
Subject: Ny beställning har kommit in från ace Beställnings-ID: FA12914-1
From: [email protected]
X-Mailer: Html Mime Mail Class
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="=_41bea315b9b2f2301a97632f8d6c3057"
Message-Id: <[email protected]>
Date: Mon, 14 Nov 2011 11:16:52 +0000 (UTC)
X-Spam-Status: No, score=1.4
X-Spam-Score: 14
X-Spam-Bar: +
X-Ham-Report: Spam detection software, running on the system "somewhere", has
identified this incoming email as possible spam. The original message
has been attached to this so you can view it (if it isn't spam) or label
similar future email. If you have any questions, see
the administrator of that system for details.
X-Spam-Flag: NO
This is a MIME encoded message.
--=_41bea315b9b2f2301a97632f8d6c3057
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: base64
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09IA0KYWNlIA0KPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09IA0KICAgICAgICAgICAgICAgIA0KKioqIE5ZIEJlc3TDpGxsbmluZyAq
KiogDQ........
--=_41bea315b9b2f2301a97632f8d6c3057--
I have a problem with Swedish language + MS Outlook.
It all works nice and dandy everywhere but MS Outlook. In MS Outlook Swedish characters show as �. Email contents is base64 encoded, uft-8 etc. What can be wrong?
ADDENDUM:
This is the message:
============================================================
Header
============================================================
*** NY Beställning ***
Ni har fått ny beställning från: FirstAccount
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Beställnings-ID: FA12914-1
Beställningsdetaljer: http://somelink
Beställningsdatum: 11/14/2011 11:16
Önskat leveransdatum:
Ordersedel: http://somlink
Original: <http://somelink>
Product: New stuff
Product ID:
Description:
Qty: 11
Job type: Release from stock
Kommenar: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_______________________________________________________________
Copyright (c) 2011 Someone
And this is the source:
Return-path: <[email protected]>
Envelope-to: [email protected]
Delivery-date: Mon, 14 Nov 2011 11:17:00 +0000
Received: from somewhere ([123.456.789.012])
by someone.co.uk with esmtp (Exim 4.69)
(envelope-from <[email protected]>)
id 1RPuX1-0006sU-HG
for [email protected]; Mon, 14 Nov 2011 11:16:58 +0000
Received: by someone.co.ul (Postfix, from userid 33)
id B743C4EB7F; Mon, 14 Nov 2011 11:16:52 +0000 (UTC)
To: "Admin" <[email protected]>
Subject: Ny beställning har kommit in från ace Beställnings-ID: FA12914-1
From: [email protected]
X-Mailer: Html Mime Mail Class
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="=_41bea315b9b2f2301a97632f8d6c3057"
Message-Id: <[email protected]>
Date: Mon, 14 Nov 2011 11:16:52 +0000 (UTC)
X-Spam-Status: No, score=1.4
X-Spam-Score: 14
X-Spam-Bar: +
X-Ham-Report: Spam detection software, running on the system "somewhere", has
identified this incoming email as possible spam. The original message
has been attached to this so you can view it (if it isn't spam) or label
similar future email. If you have any questions, see
the administrator of that system for details.
X-Spam-Flag: NO
This is a MIME encoded message.
--=_41bea315b9b2f2301a97632f8d6c3057
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: base64
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09IA0KYWNlIA0KPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09IA0KICAgICAgICAgICAgICAgIA0KKioqIE5ZIEJlc3TDpGxsbmluZyAq
KiogDQ........
--=_41bea315b9b2f2301a97632f8d6c3057--
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
粘贴的消息源的 Content-Type: 标头中间似乎有一个虚假的换行符。它应该是一条逻辑线;尽管您可能粘贴错误(已接收:标头至少没有正确粘贴)。在 Base64 主体部分中似乎也发生了类似的情况——我们在数据行之间看到空行。
它看起来像这样:
应该是:
在“boundary”关键字之前至少有一个空格字符;或者甚至
此外,如果主题行包含 8 位数据,则应该对主题行进行 RFC2047 编码。
删除换行符后,正文部分中的 base64 数据看起来是正确的,即单词“Beställning”显示正确(尽管它应该正确地不正确大小写;也许有一个瑞典.stackexchange.com 可以对您的副本进行批评?: -)
X-Mailer: 标头表明您正在使用某个软件生成这些消息;它可能有正确执行这些操作的选项,但您没有使用它们。这是一个编程论坛,因此您可能应该向我们展示您的代码,并使用适当的编程语言标记问题。
The pasted message source appears to have a spurious newline in the middle of the Content-Type: header. It should be a single logical line; although perhaps you pasted it wrong (the Received: headers at least have not been pasted correctly). Something similar appears to have happened in the base64 body part -- we see empty lines between the lines of data.
It looks like this:
It should be:
with at least one whitespace character before the "boundary" keyword; or even
Additionally, you should RFC2047-encode the Subject line if it contains 8-bit data.
After removing the newlines, the base64 data in the body part looks correct, i.e. the word "Beställning" shows correctly (although it should properly not be proper-cased; perhaps there is a Swedish.stackexchange.com for critique of your copy? :-)
The X-Mailer: header indicates that you are generating these messages with a piece of software; it probably has options to do these things right, but you are not using them. This is a programming forum so you should probably show us your code, and tag the question with the appropriate programming language.