Sicos1977 / MSGReader

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

Exception is thrown when converting (some of the) .msg file to HTML that contains ==> symbol #316

Closed EugineD closed 1 year ago

EugineD commented 1 year ago

When calling:

var reader = new MsgReader.Reader(); files = reader.ExtractToFolder( inputFile, outputFolder, messageType: MsgReader.Outlook.MessageType.Email);

for the .msg file with "==>" symbol next exception is thrown:

System.FormatException: Input string was not in a correct format. at System.Number.ThrowOverflowOrFormatException(ParsingStatus status, TypeCode type) at RtfPipe.Model.FieldParser.ParseSymbol(IList1 args, IEnumerable1 styles) at RtfPipe.Model.Builder.Build(List1 body, Document document, List1 defaultStyles) at RtfPipe.Model.Builder.Build(Document document) at RtfPipe.Rtf.ToHtml(RtfSource source, XmlWriter writer, RtfHtmlSettings settings) at RtfPipe.Rtf.ToHtml(RtfSource source, RtfHtmlSettings settings) at MsgReader.Outlook.RtfToHtmlConverter.ConvertRtfToHtml(String rtf) at MsgReader.Reader.PreProcessMsgFile(Message message, ReaderHyperLinks hyperlinks, String outputFolder, String& fileName, Boolean& htmlBody, String& body, String& contactPhotoFileName, List1& attachments, List1& files) at MsgReader.Reader.WriteMsgEmail(Message message, String outputFolder, ReaderHyperLinks hyperlinks) at MsgReader.Reader.ExtractToFolder(String inputFile, String outputFolder, ReaderHyperLinks hyperlinks, Nullable`1 messageType, Stream logStream) at ConsoleApp1.MsgReaderExtraction.Extract(String inputFile) in D:\repo\dev.jennydronova\msgReaderTest\MsgReaderTest\ConsoleApp1\MsgReaderExtraction.cs:line 18

b.zip

Sicos1977 commented 1 year ago

I can't fix this bug because it is happening in another library that is not made by me. Best to raise an issue overhere --> https://github.com/erdomke/RtfPipe/issues