Free Support Forum -

Strange carachters in french mails


I'm facing a problem when i'm creating my msg and my html from an eml. (see attachments)

The problem is that i'f you open the EML, you will see that the charset is

The moment that I generate my MSG. My charset is still
{\*\htmltag241 }

And the moment that i generate the HTML still the charset is Windows-1252.

I think for the msg that's no problem because I can see the french characters.
But for the html you will see that the french carachters are strange.

Bellow you can see my code:

public static void ConvertEmlToMsg(string emlFilePath, out string msgFilePath)
var mailMessage = MailMessage.Load(emlFilePath, new EmlLoadOptions());
msgFilePath = FileUtility.GetTempFileName("msg");
mailMessage.PreferredTextEncoding = Encoding.UTF8;
mailMessage.Save(msgFilePath, Aspose.Email.Mail.SaveOptions.DefaultMsgUnicode);

public static string GetMailFile(string msgFilepath, out List attachments)
attachments = new List();
string result;

var tmpFileName = FileUtility.GetTempFileName("tmp");
// Try saving as HTML
var mailMessage = MailMessage.Load(msgFilepath, new MsgLoadOptions());
mailMessage.TimeZoneOffset = TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Now);
mailMessage.BodyEncoding = Encoding.UTF8;
mailMessage.PreferredTextEncoding = Encoding.UTF8;

HtmlSaveOptions options = Aspose.Email.Mail.SaveOptions.DefaultHtml;
mailMessage.IsBodyHtml = true;

//save the message headers to output HTML using the formatting options
options.HtmlFormatOptions = HtmlFormatOptions.WriteHeader | HtmlFormatOptions.WriteCompleteEmailAddress;
options.MailMessageSaveType = MailMessageSaveType.HtmlFormat;
options.CheckBodyContentEncoding = true;

//First save the mail as a HTML
mailMessage.Save(tmpFileName, options);
if (File.Exists(tmpFileName))
try { File.Delete(tmpFileName); }
catch { }
tmpFileName = null;


Thank you for writing to Aspose Support team.

We have investigated this problem at our end and were able to observe the issue you have mentioned. It has been logged as EMAILNET-38603 for further investigation by our Product team. We’ll update you here once there is some feedback or a fix version available in this regard.

The issues you have found earlier (filed as EMAILNET-38603) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by Aspose Notifier.