Sicos1977 / MSGReader

C# Outlook MSG file reader without the need for Outlook
http://sicos1977.github.io/MSGReader
MIT License
490 stars 168 forks source link

Outlook.Storage.Message class BodyHtml property encoding problem #279

Closed Nir1812 closed 3 years ago

Nir1812 commented 3 years ago

There are cases, where some part of the email message body is returned in BodyHtml property with the wrong encoding.

See the following example: Encoding Problem Email.zip

The lower part of the message (the forwarded part) should also be encoded in Herbew. When opening this message using Outlook (by double-clicking) the encoding is correct, but when reading the BodyHtml using MSGReader, the lower part gets the wrong encoding and the Hebrew text is not readable.

Sicos1977 commented 3 years ago

Can you also sent me a screenshot about how it should look like?

Nir1812 commented 3 years ago

Basically in this example, the lower part (which was the forwarded message) should be similar to the upper part. I have attached a screen shot of the lower part (below the text "forwarded message"): image

Nir1812 commented 3 years ago

You can also look at this zip file containing a .msg file with various fonts. Fonts test.zip

When getting the BodyHtml contents you can clearly see that some fonts are wrongly encoded: image

Sicos1977 commented 3 years ago

Sorry for the late response, it was a little bit crazy at work the last few week. Looking into your issue now.

Sicos1977 commented 3 years ago

Fixed in this commit 5395d73e999dca3590400ea3b4310758f2af959f

Sicos1977 commented 3 years ago

I just released a new nuget package with the fix in it

Nir1812 commented 3 years ago

Thanks. It works now.

Sicos1977 commented 3 years ago

Your welcome