Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

my code is not allowing me to pass Non-English characters to below function and contype is "text/calender"

Attachment avCal = Attachment.CreateAttachmentFromString(str.ToString(), contype);

is the any fix for this ?

Thanks
Posted
Comments
DamithSL 17-Nov-14 3:41am    
try

Attachment avCal = Attachment.CreateAttachmentFromString(str.ToString(),"unicode attachment", System.Text.Encoding.Unicode, "text/calendar");
Ddev5a2 17-Nov-14 7:07am    
Yes, Its working but the attachment format changing to unknown format. I am trying to create attachment as .ics file

1 solution

by adding below i resolved

Attachment avCal = Attachment.CreateAttachmentFromString(str.ToString(), filename+ ".ics");

Thank you so much.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900