Outlook Express saving eml file with “=” at end of line

寵の児 提交于 2019-12-10 23:35:28

问题


I'm trying to save an .eml file from OutLook Express but the file saved has in some lines the character "=" (equal) at the end of line.

When editing the message in souce mode the html seems normal, just save it and the "=" appears.

It is not good for me because I will edit the .eml in my application before send it. I have to find the /BODY tag and insert a text. An exemple:

</DIV></DIV></DIV></DIV></DIV><FONT=20
style=3D"FONT-STYLE: normal; FONT-FAMILY: calibri; COLOR: rgb(0,0,0); =
FONT-SIZE: small; FONT-WEIGHT: normal"=20
face=3DCalibri><A=20
target=3D_blank></A></FONT></DIV></DIV></DIV></DIV></DIV></DIV></DIV></BO=
DY></HTML>

In this case, I can't find the body because it is writed BO=DY.

I have tried save it in various codifications, but same result. Why OutLook is saving it this way?


回答1:


Outlook is using = as an escape symbol. If X and Y are hex digits =XY must be substituted with the character with ASCII code XY. If = is followed by a newline this newline must be removed and the lines joined.

Outlook does this because only a limited range of byte values can be transferred safely via SMTP and bytes outside of this range must be quoted. Also there are limits on the line length, so Outlook by default splits lines that are longer than 75 bytes long. I believe this is called Quotted-Printable encoding.

Check the Content-Transfer-Encoding: header in the .eml file and run the file through a decoder before applying your filter. And encode it again after filtering.



来源:https://stackoverflow.com/questions/14465834/outlook-express-saving-eml-file-with-at-end-of-line

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!