Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET Objects

 AfterLogic Forum : MailBee.NET Objects
Subject Topic: UNICODE support with 5.7 Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
rre
Newbie
Newbie
Avatar

Joined: 04 September 2009
Location: Italy
Online Status: Offline
Posts: 7
Posted: 07 October 2009 at 9:40am | IP Logged Quote rre

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 View rre's Profile Search for other posts by rre
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6094
Posted: 08 October 2009 at 1:23am | IP Logged Quote Igor

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 View Igor's Profile Search for other posts by Igor
 
Andrew
AfterLogic Support
AfterLogic Support


Joined: 28 April 2006
Location: United States
Online Status: Offline
Posts: 1189
Posted: 08 October 2009 at 1:58am | IP Logged Quote Andrew

BTW, the following line has no effect:

Code:
msg.Charset = "UTF-8"


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 View Andrew's Profile Search for other posts by Andrew
 
rre
Newbie
Newbie
Avatar

Joined: 04 September 2009
Location: Italy
Online Status: Offline
Posts: 7
Posted: 08 October 2009 at 6:16am | IP Logged Quote rre

ok, thanks I will send you some e-mail with problems.

Rre
Back to Top View rre's Profile Search for other posts by rre
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide