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

Free Support Forum - aspose.com

Issue with Unicode character name as an attachment

Hello Friend,



I have problem with unicode character name as an attachment.When i set attachment name as non english like Jerman,Marathi,Urdu any unicode character. Then it is not showing.

Please help me!
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times; -webkit-text-stroke: #000000} span.s1 {font-kerning: none}

Hi,


Thank you for writing to Aspose Support team.

Could you please share your sample code with us that you are using at your end? We have tested the following code sample that loads such an attachment file with Unicode Characters in its name and no such problem is observed at our end.

Sample Code:

MailMessage eml = new MailMessage();

Attachment att = new Attachment(“Marché.txt”);

eml.getAttachments().addItem(att);

eml.save(“out.eml”);

this is my attachment name ->¢®£¥¤.zip

This is my sample code ->



p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px} span.s1 {color: #0326cc} span.s2 {color: #3933ff} span.Apple-tab-span {white-space:pre}

PersonalStorage pst = PersonalStorage.create(dst,FileFormatVersion.Unicode);

FolderInfo inboxFolder = pst.createPredefinedFolder("Inbox", StandardIpmFolder.Inbox);


p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px} span.s1 {color: #931a68} span.Apple-tab-span {white-space:pre}

for(File emlFile:emlFilePathArray)

{

msg=MailMessage.load(emlFile.getAbsolutePath());

MapiMessage message = null;

if(msg != null)

{

message=MapiMessage.fromMailMessage(msg);

}

if(message != null)

{

inboxFolder.addMessage(message);

}

}

Steps to produce issue


1) create .eml using attachment name as ¢®£¥¤.zip

2) create MBOX

3) convert MBOX to PST File

4)Open PST using microsoft outlook

then you will be see issue

Hi,


Please modify your code to include the Unicode conversion option while loading from MailMessage, as shown in the following code sample and let us know your feedback.

Sample Code:

MapiMessage mapi = MapiMessage.fromMailMessage(eml, MapiConversionOptions.getUnicodeFormat());

let me check and update you soon.

Thank You Very much. This is work for me.

You are welcome and please feel free to write to us for any further query in this regard.