繁体   English   中英

谷歌编码问题base64和PHP解码

[英]Google encoding issue base64 and PHP decode

好吧,我有一个复杂的问题。 我会尽力解释清楚。

我正在从谷歌转发一封电子邮件到一个PHP脚本。 如果我使用“@”符号,它会将其编码为base 64,如下所示。 我可以解码它,但有时电子邮件没有“@”符号所以它不会在电子邮件中编码...如果我在我的PHP代码中运行base64脚本,它会解码,即使它没有必须和搞乱文本。

说得通?

下面是一个编码的示例,因为使用了“@”符号:

Example ONE I sent this: sample@sample.com
=============================================
The email came out like this.

Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes
Content-Transfer-Encoding: base64

U2FtcGxloXNhbXBsZS5jb20NCg0KLS0NClNlbnQgdXNpbmcgU01TLXRvLWVtYWlsLiAgUmVwbHkg
dG8gdGhpcyBlbWFpbCB0byB0ZXh0IHRoZSBzZW5kZXIgYmFjayBhbmQgIA0Kc2F2ZSBvbiBTTVMg
ZmVlcy4NCmh0dHBzOi8vd3d3Lmdvb2dsZS5jb20vdm9pY2UNCg==

------------------------------------------------------
------------------------------------------------------


Example TWO I sent this: Hello World
======================================================
The email came like this:

Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes

Hello world

如何测试其编码,然后如何正确编码?

非常感谢。

-ed

答案就在那里,看看下面的标题:

Content-Transfer-Encoding: base64

它告诉您内容使用base64编码进行编码。

暂无
暂无

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

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