CDO charset refresh problems
Exchange Server Forum Index Exchange Server
Discussion forums for Microsoft Exchange Server users.
Microsoft Outlook
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web ExchangeServerHelp.com
CDO charset refresh problems

 
Post new topic   Reply to topic    Exchange Server Forum Index -> Development
Author Message
goldyhon
Guest





Posted: Sun Nov 27, 2005 5:58 pm    Post subject: CDO charset refresh problems Reply with quote

I have a weird sync problem with CDO on exchange 2003.
I'm trying to open an email item on exchange using the CDO interface and
debug its charset. Below is the benchmark I'm using:

string msgUrl = <my message url>;
CDO.Message Msg = new CDO.MessageClass();
Msg.DataSource.Open(msgUrl,
null,
ADODB.ConnectModeEnum.adModeReadWrite,
ADODB.RecordCreateOptionsEnum.adFailIfNotExists,
ADODB.RecordOpenOptionsEnum.adOpenSource,
"",
"");
string charset1 = Msg.HTMLBodyPart.Charset;
string charset2 = Msg.HTMLBodyPart.Charset;
Console.WriteLine(charset1 + " - " + charset2);

My problem was that I got the wrong charset.
So I started debugging it.
I placed a breakpoint before charset2 line executing.
When reaching this line I looked at the value recieved in charset1 and it
was null.
So I went to look at the value of the Msg.HTMLBodyPart.Charset in the quick
view and saw my non latin encoding value.
I then stepped over charset2 and ofcourse it got the right value.
If I do not use the quick view in the debugger, I get the wrong charset for
both calls.
It looks as if when openning the CDO object there should be some force of
content extraction.
Any ideas?

Thanks,
goldyon.

Back to top
 
Post new topic   Reply to topic    Exchange Server Forum Index -> Development All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server Dedicated Servers
New Topics Powered by phpBB