Making Game: Chinese letters showing up when replying to email in Outlook

Original Source Link

I received an email today that was sent out to our organisation. When I clicked reply in Outlook the following characters appeared on top of the other characters:

䐼噉氠湡㵧癳挠慬獳伽瑵潬歯敍獳条䡥慥敤⁲污杩㵮氢晥≴䐠剉∽呌≒‾䘼乏⁔慆散∽≃匠穩㵥㸲㰭剂‾䈼䘾⼼㹂䘠†䈼㹒㰠㹂㱓䈯‾㱤剂‾䈼吾⼼㹂嘠䈼㹒†䈼CHAR⼼㹂䨠䈼㹒†㰠䘯乏㹔㰠䐯噉㰾䥄㹖⼼䥄㹖

I had to edit one character away from the original message because I got the error from superuser:

Body cannot contain “CHAR“. Unlucky.

These letters were not visible before I hit reply and it was the same for my colleagues who received it. The email is written in plain text so I can’t even select “View Source” either. Has anyone experienced this before?

Opened message, note Plain Text:
enter image description here

Replying:
enter image description here

For some reason, Outlook is misinterpreting the message body as UTF-16-LE while it is in fact regular ASCII-based text. (The given sample is purely ASCII, the whole message might be UTF-8.)

misdecoded:    䐼     噉     氠     湡     㵧
 (Unicode):  U+443C U+5649 U+6C20 U+6E61 U+3D67
 raw bytes:  3C 44  49 56  20 6c  61 6e  67 3d
     UTF-8:  <   D  I   V  ␣   l  a   n  g   =  

The given sample decodes as:

<DIV lang=sv class=OutlookMessageHeader align="left" DIR="LTR"> <FONT Face="C" Size=2>-<BR> <B>F</B> F  <BR> <B>S</B> d<BR> <B>T</B> V<BR>  <BCHAR</B> J<BR>   </FONT> </DIV><DIV></DIV>

I don’t know why Outlook uses the wrong encoding. The sender might have specified it wrongly in the Content-Type header (see message’s “Properties” window); it could be that the message was prepared by an auto-mailer which confused UTF-8 and UTF-16. If Outlook and/or MS Exchange are involved, it becomes twice as difficult to figure it out.

Based on grawity’s answer I checked the header settings. This solution worked for me:

  1. Go to File -> Advanced and look up the International Options header.
  2. Uncheck “Use English for message headers on replies and forwards and for forward notifications.”
  3. Restart Outlook
  4. Test reply

I work on windows 10, Outlook Version 1902 (Office 365).

Your experience may differ.

You can use the iconv command to convert these chinese characters back to text:

iconv -f UTF-8 -t UTF-16LE input.txt

There is an online iconv you can use to fix the text here.
Just use UTF-8 as the input and UTF-16LE as the output.

Tagged : /

Leave a Reply

Your email address will not be published. Required fields are marked *