使用什么类型的编码?

发布于 2024-09-07 07:15:39 字数 352 浏览 5 评论 0 原文

我目前正在制作一个程序,其中的功能之一是提取多部分电子邮件的 HTML 部分。

我已经很好地完成了这项任务,但是某些字符上有一种我似乎无法弄清楚的编码类型,例如

',' into '=2C'
';' into '=3B'
'=' into '=3D'

它还会在各处放置随机的“=”。

有谁知道是否有一个解码器(或者甚至它的名字是什么)?我已经用代码替换了一些东西,但是可能还有很多东西我丢失了,因为我还没有遇到过它们。因此,我想要么找出编码类型,以便我可以替换所有内容,要么找到一个已经这样做的库。

PS 我正在从 hotmail 帐户发送电子邮件,如果这可能是原因的话。

I am currently making a program in which one of its functions is to extract the HTML part of a Multipart email.

I have accomplished that task fine however there is a type of encoding on some of the characters that I can't seem to figure out e.g.

',' into '=2C'
';' into '=3B'
'=' into '=3D'

and it also puts random '=' all over the place.

Does anyone know if there is a decoder for this (or even what the name of it is)? I have replaced a few things with code, however there are probably plenty more that I am missing because I haven't come across them yet. Thus, I would like to either figure out the type of encoding so I can replace everything, or find a library which has already done so.

P.s. I am sending the email from a hotmail account, if that might be the reason.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

野却迷人 2024-09-14 07:15:39

这称为 quoted-printable 编码。

不幸的是,Microsoft 现有的 QuotedPrintableStream 是内部的,因此您无法使用它。但是,您可以采用 Mono 项目或任何处理 MIME 处理的库之一。

This is called quoted-printable encoding.

Unfortunately, the existing QuotedPrintableStream from Microsoft is internal so that you cannot use it. However, you could take the one of the Mono project, or of any library dealing with MIME handling.

相思故 2024-09-14 07:15:39

它是可引用打印的编码,在此 RFC 中对此进行了解释。在你花费太多时间在你的任务上之前,让我警告你。解析电子邮件可能会让人非常头疼,因此您不应该自己这样做。尝试这些免费库,这是我见过的最好的库(而且我已经看过很多)http://www.lumisoft.ee/lswww/download/downloads/Net/

It is quoted-printable encoding, it is explained in this RFC. Let me warn you before you spend too much time on your task. Parsing emails can turn into real headache, so you should not do it yourself. try these free library, it is the best one i have ever seen (and i have seen a lot of them) http://www.lumisoft.ee/lswww/download/downloads/Net/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文