简体   繁体   English

在以base64编码的电子邮件中

[英]� in base64 encoded emails

I have a problem with Swedish language + MS Outlook. 我的瑞典语+ MS Outlook有问题。

It all works nice and dandy everywhere but MS Outlook. 除了MS Outlook之外,所有其他功能都很好用。 In MS Outlook Swedish characters show as . 在MS Outlook中,瑞典语字符显示为``。 Email contents is base64 encoded, uft-8 etc. What can be wrong? 电子邮件内容是使用base64编码,uft-8编码的。什么地方可以出错?

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: <test@example.com>
Envelope-to: admin@example.com
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 <test@example.com>)
        id 1RPuX1-0006sU-HG
        for admin@example.com; 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" <admin@example.com>
Subject: Ny beställning har kommit in från ace Beställnings-ID: FA12914-1
From: test@example.com
X-Mailer: Html Mime Mail Class
MIME-Version: 1.0
Content-Type: multipart/mixed;

   boundary="=_41bea315b9b2f2301a97632f8d6c3057"
Message-Id: <20111114111652.B743C4EB7F@li214-208.members.linode.com>
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--

The pasted message source appears to have a spurious newline in the middle of the Content-Type: header. 粘贴的消息源在Content-Type:标头的中间似乎有一个虚假的换行符。 It should be a single logical line; 它应该是一条逻辑线; although perhaps you pasted it wrong (the Received: headers at least have not been pasted correctly). 尽管您可能粘贴了错误的代码(至少没有正确粘贴Received:标题)。 Something similar appears to have happened in the base64 body part -- we see empty lines between the lines of data. 在base64主体部分似乎发生了类似的事情-我们在数据行之间看到空行。

It looks like this: 看起来像这样:

Content-Type: multipart/mixed;

boundary="=_41bea315b9b2f2301a97632f8d6c3057"

It should be: 它应该是:

Content-Type: multipart/mixed;
   boundary="=_41bea315b9b2f2301a97632f8d6c3057"

with at least one whitespace character before the "boundary" keyword; 在“边界”关键字之前至少有一个空格字符; or even 甚至

Content-Type: multipart/mixed; boundary="=_41bea315b9b2f2301a97632f8d6c3057"

Additionally, you should RFC2047-encode the Subject line if it contains 8-bit data. 此外,如果主题行包含8位数据,则​​应进行RFC2047编码。

Subject: =?utf-8?Q?Ny_best=C3=A4llning_har_kommit_in_fr=C3=A5n_ace_Best=C3=A4llnings-ID:_FA12914-1?=

After removing the newlines, the base64 data in the body part looks correct, ie 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? :-) 删除换行符后,正文部分的base64数据看起来正确,即“Beställning”一词显示正确(尽管不应使用大写字母;也许有Swedish.stackexchange.com来批评您的副本?: -)

The X-Mailer: header indicates that you are generating these messages with a piece of software; X-Mailer:标头表明您正在使用一个软件生成这些消息; 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. 这是一个编程论坛,因此您可能应该向我们展示您的代码,并使用适当的编程语言标记问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM