We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Cannot read chinese character correctly from EWSClient

Hi there,

I’ve got a issue that when I use EWSClient to read the email from O365, the Chinese content becomes ???.

Here is my code sample:

using (IEWSClient ews = EWSClient.GetEWSClient("https://outlook.office365.com/ews/exchange.asmx", "username", "password")) {
	ExchangeQueryBuilder eqb = new ExchangeQueryBuilder();
	
	eqb.HasNoFlags(ExchangeMessageFlag.IsRead);
	
	MailQuery query = eqb.GetQuery();
	ExchangeMessageInfoCollection msgCollection = ews.ListMessages(ews.MailboxInfo.InboxUri, query);
	MemoryStream ms = new MemoryStream();
	
	ews.SaveMessage(msgCollection.First().UniqueUri, ms);

	byte[] eml = ms.ToArray();
	log.Info("Email content: " + System.Text.Encoding.UTF8.GetString(eml));
}

Is there any setting can fix this issue?

Thanks
Eddie

@echu,

I have observed the issue shared by you and suggest you to please try using latest Aspose.Email for .NET 20.3 on your end. In case there is still an issue then please share the source file and snapshot of output obtained on your end.