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

Free Support Forum - aspose.com

MessageInfo.getSubject method returns incorrectly encoded text

Hi,

I need a help from you on how to correctly get message subject from a PST file.
I’m using the following code:

MessageInfo messageInfo = (MessageInfo) messageInfoCollection.get(i);
String subject = messageInfo.getSubject();

The problem is:
Some messages have chinese letters in subject, and I’m not getting them correctly.
Instead I have the ‘?’ character.
Can you help me on setting the correct encoding to retrieve the subject accordingly?

Thanks

@kelberuc1,
Thank you for posting the query. I did not find a way to change encoding for MessageInfo objects. It seems that this is usually not necessary. Please check the problem with the latest version of Aspose.Email. If the issue persists, please share the following:

  • input PST file
  • your code part creating messageInfoCollection object