Outlook 2016: Some emails arrive with the body in Chinese

独自空忆成欢 提交于 2020-05-17 06:12:15

问题


Occasionally one of our users will receive an email from a known source, and the characters of the body of the email will be Chinese instead of English. They won't all be Chinese, but a mix of Chinese and some random characters, like this:

"格浴㹬਍†格慥㹤਍††䴼呅⁁瑨灴攭畱癩∽潃瑮湥⵴祔数•潣瑮湥㵴琢硥⽴瑨汭※档牡敳㵴瑵ⵦ㘱㸢਍††洼瑥⁡瑨灴攭畱癩∽潃瑮湥⵴祔数•潣瑮湥㵴琢硥⽴瑨汭※档牡敳㵴卉ⵏ㠸㤵ㄭ㸢਍††琼瑩敬刾捩敫⁹效潲慭獮䠠獡䐠汥癩牥摥夠畯⁲汆睯牥⁳牏䜠晩㱴琯瑩敬ാ 㰠栯慥㹤਍†戼摯⁹杢潣潬㵲⌢晦晦晦㸢਍††琼扡敬眠摩"

It only seems to be happening to one or two users, and it's not every sender - in fact, one of the emails from the sender could be fine, and the next could be like this. Encoding seems to be fine, but we're not sure where else to look. One other thing - we have Barracuda as our email filter. If we view one of the problem emails in Barracuda first, it's English. It seems to be changed to Chinese on the client side.

We have an on prem Exchange 2016 server with Outlook 2016 as the mail client, and the OS is Windows 10. Thanks!


回答1:


I can tell you what has happened although I cannot tell you why.

I saved your string to a text file. I created a small Excel macro to read that file and display the characters in hexadecimal:

683C 6D74 3E6C 0A0D 2020 683C 6165 3E64 0A0D 2020 2020 4D3C 5445 2041 7468 7074 652D 7571
7669 223D 6F43 746E 6E65 2D74 7954 6570 2022 6F63 746E 6E65 3D74 7422 7865 2F74 7468 6C6D
203B 6863 7261 6573 3D74 7475 2D66 3631 3E22 0A0D 2020 2020 6D3C 7465 2061 7468 7074 652D
7571 7669 223D 6F43 746E 6E65 2D74 7954 6570 2022 6F63 746E 6E65 3D74 7422 7865 2F74 7468
6C6D 203B 6863 7261 6573 3D74 5349 2D4F 3838 3935 312D 3E22 0A0D 2020 2020 743C 7469 656C
523E 6369 656B 2079 6548 6F72 616D 736E 4820 7361 4420 6C65 7669 7265 6465 5920 756F 2072
6C46 776F 7265 2073 724F 4720 6669 3C74 742F 7469 656C 0D3E 200A 3C20 682F 6165 3E64 0A0D
2020 623C 646F 2079 6762 6F63 6F6C 3D72 2322 6666 6666 6666 3E22 0A0D 2020 2020 743C 6261
656C 7720 6469

Each pair of hexadecimal digits represents a valid ASCII character. The fourth character is “0A0D” or “linefeed carriage-return”. This should be “carriage-return linefeed”. Somehow a valid ASCII email body has been interpreted as a little-endian UTF-16 email body. If you split these characters up and reverse them, you get:

<html>
  <head>
    <META http-equiv="Content-Type" content="text/html; charset=utf-16">
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Rickey Heromans Has Delivered Your Flowers Or Gift</title>
  </head>
  <body bgcolor="#ffffff">
    <table wid

My knowledge of Html does not extend to knowing the significance of having two charsets defined although it would appear the first has been obeyed. All the other tags (html, head, meta, title, body and table) are lower case so my guess is that the incorrect <META http-equiv="Content-Type" content="text/html; charset=utf-16"> has been added somewhere.

Hope this helps.



来源:https://stackoverflow.com/questions/61487138/outlook-2016-some-emails-arrive-with-the-body-in-chinese

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