The following code reads an outlook msg file and extracts some property values (e.g. Subject, DisplayTo). Alle property values contain special characters like ‘Ä’, ‘Ü’, ‘Ö’ or ‘ß’ .
The extracted text contains no special characters. How can i extract the correct values?
The example code an a sample MSG- File is included.
Thanks in advance, Martin
=========== Environment ========================
Windows XP SP 3 (German version)
Visual Studio 2008 SP 1 (German version)
Dotnet Framework 2.0
Aspose.Network: Version 4.9.0.0
MS Outlook 2007 (German version)
=========== Example code =======================
using System;
using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Text;
using Aspose.Network.Outlook;
namespace MailTest
{
class Program
{
static void Main(string[] args)
{
MapiMessage msg= MapiMessage.FromFile(“Testmail1.msg”);
string strTo = msg.DisplayTo;
string strSubject = msg.Subject;
string strBody = msg.Body;
Assert.IsTrue(strTo.IndexOf(“Jörg Stolzfuß”) > 0, “Property TO doesn’t contain emailadress ‘Jörg Stolzfuß’”);
Assert.IsTrue(strSubject.IndexOf(“Testmails mit Umlauten ä Ä ö Ö ü Ü ß und Euro € Zeichen”) > 0, “Property SUBJECT doesn’t contain text ‘Testmails mit Umlauten ä Ä ö Ö ü Ü ß und Euro € Zeichen’”);
Assert.IsTrue(strBody.IndexOf(“Bodytext mit Umlauten ä Ä ö Ö ü Ü ß und Euro € Zeichen”) > 0, “Property BODY doesn’t contain text ‘Bodytext mit Umlauten ä Ä ö Ö ü Ü ß und Euro € Zeichen’”);
msg = null;
}
}
}
Hi Martin,
Thanks for considering Aspose.
This might be due to the German characters in subject and body. We will look into it.
I have logged this issue in our bug tracking system (ID: 14261). We will notify you when we make some progress to fix it. Sorry for the inconvenience.
The issues you have found earlier (filed as 14261) have been fixed in [this update ](http://www.aspose.com/community/files/51/.net-components/aspose.network-for-.net/entry224476.aspx)
.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.