Unicode issue

I m usiing aspose email 21.2 i m trying to create ost to eml but am getting unicode which i have handled
by using this code

MapiConversionOptions d = MapiConversionOptions.getASCIIFormat();
								MailConversionOptions de = new MailConversionOptions();

MailMessage mess1 = message1.toMailMessage(de);

but in output i m still getting image (1).png (17.1 KB)

@Harish2020,
To my regret, I cannot use your code example having unknown symbol message1 to investigate the issue. Please share the OST file and a simple comprehensive code example reproducing the problem.

here is the sample code with a pst file as requested

pst = PersonalStorage.fromFile(filepath);

	FolderInfo folderInfo2 = pst.getRootFolder();

MessageInfoCollection messageInfoCollection1 = folderInfo2.getContents();

for (int i = 0; i < messageInfoCollection1.size(); i++) {
MessageInfo messageInfo = (MessageInfo) messageInfoCollection1.get_Item(i);
MapiMessage message1 = pst.extractMessage(messageInfo);
MapiConversionOptions d = MapiConversionOptions.getASCIIFormat();
MailConversionOptions de = new MailConversionOptions();
MailMessage mess1 = message1.toMailMessage(de);
MapiMessage message = MapiMessage.fromMailMessage(mess1, d);
message.save(path+".eml",
SaveOptions.getDefaultEml());

}

@Harish2020,
Thank you for the code example. I have not found the PST or OST file in your zip archive. Please try to upload one again.

please find the attached pst filepst.zip (21.3 KB)

@Harish2020,
To my regret, this file is corrupted or damaged. I cannot extract it.

i have downloaded the file and checked it is working fine for me any way i m providing you with a link please download from here

sysinfotools-my.sharepoint.com

@Harish2020,
I cannot use that link to download the file. I have been received an error message “The user was not found in the directory”. You can try to use Google Drive or Dropbox.

here is the google drive link containing pst file in zip and unzip form

https://drive.google.com/drive/folders/1QavI-f4ECodZkTO7bfX64-NNjQWThlvH?usp=sharing

@Harish2020,
Thank you for the PST file sample. Could you tell us how was it generated?
Also, I cannot reproduce the issue because the messageInfoCollection1 is empty. Please share a code example that can be used to investigate the problem.

can you try this

pst = PersonalStorage.fromFile(filepath);

FolderInfoCollection folderInf = pst.getRootFolder().getSubFolders();

	for (int j = 0; j < folderInf.size(); j++) {
FolderInfo folderInfo2 =  folderInf.get_Item(j);

MessageInfoCollection messageInfoCollection1 = folderInfo2.getContents();

for (int i = 0; i < messageInfoCollection1.size(); i++) {
MessageInfo messageInfo = (MessageInfo) messageInfoCollection1.get_Item(i);
MapiMessage message1 = pst.extractMessage(messageInfo);
MapiConversionOptions d = MapiConversionOptions.getASCIIFormat();
MailConversionOptions de = new MailConversionOptions();
MailMessage mess1 = message1.toMailMessage(de);
MapiMessage message = MapiMessage.fromMailMessage(mess1, d);
message.save(path+".eml",
SaveOptions.getDefaultEml());

}}

@Harish2020,
If you open the PST file in Outlook, you will see the same problem. Could you let us know how you obtained this file?

it was ost file given to us by client I m providing you with a sample file given to us https://drive.google.com/drive/folders/1VsvJ_6SUmETueqWjkTYIfCYPqgP_ynAZ?usp=sharing

@Harish2020,
Does it mean that the PST file was generated from the OST file via Aspose.Email? If so, could you share a code example that was used to generate the PST file?

the code is big but here is itcode.zip (4.0 KB) it will give you an idea how we have done it

@Harish2020,
Unfortunately, I cannot use your code example to reproduce the issue. You should isolate the problem in a simple comprehensive code example converting an OST file to a PST file containing the problem.