Author |
|
rre Newbie
Joined: 04 September 2009 Location: Italy
Online Status: Offline Posts: 7
|
Posted: 07 October 2009 at 9:40am | IP Logged
|
|
|
Hi,
I retrieve a message with
Dim msg As New MailMessage
Dim buff as string
Dim sw As StreamWriter
msg.Charset = "UTF-8"
msg = pop.DownloadEntireMessage(pop.GetMessageIndexFromUid(Udi))
...
buff=msg.GetHtmlAndSaveRelatedFiles())
sw.Write(buff)
and display it with MyBrowser as WebBrowser component:
MyBrowser.Navigate("FileSaved.html")
I still have a *lot* of characters (usually accent) badly displayed.
What I'm making wrong?
Suggestion?
thnaks
RRE
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 08 October 2009 at 1:23am | IP Logged
|
|
|
Try setting charset explicitly for displaying message in web browser. If that doesn't help, please provide us with the original message file for examination.
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|
Andrew AfterLogic Support
Joined: 28 April 2006 Location: United States
Online Status: Offline Posts: 1189
|
Posted: 08 October 2009 at 1:58am | IP Logged
|
|
|
BTW, the following line has no effect:
That's because msg = pop.DownloadEntireMessage(pop.GetMessageIndexFromUid(Udi)) creates a new instance of MailMessage and the previous instance is collected by GC.
You don't need to set charset at all in this case. Quotation from the documentation for MailMessage.Charset Property:
Quote:
For existing e-mail messages being parsed (rather than for new messages being composed) Charset property value is not important for the developer because MailBee automatically converts the message content accordingly the charset information in the message and the application received the already decoded content. In this case, Charset property value has the informative feature only. |
|
|
Best regards,
Andrew
|
Back to Top |
|
|
rre Newbie
Joined: 04 September 2009 Location: Italy
Online Status: Offline Posts: 7
|
Posted: 08 October 2009 at 6:16am | IP Logged
|
|
|
ok, thanks I will send you some e-mail with problems.
Rre
|
Back to Top |
|
|