Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET IMAP

 AfterLogic Forum : MailBee.NET IMAP
Subject Topic: Encoded MessagePreview.BodyPlainText Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
indapublic
Newbie
Newbie


Joined: 18 November 2014
Location: Russian Federation
Online Status: Offline
Posts: 8
Posted: 18 November 2014 at 9:06pm | IP Logged Quote indapublic

I have several cyrillic messages with encoded Envelope.MessagePreview.BodyPlainText

Code:

connection.SelectFolder("INBOX");
EnvelopeCollection envelopes = connection.DownloadEnvelopes("53", true, EnvelopeParts.MessagePreview, 1000);
var envelope = envelopes[0];
appendLog(envelope.MessagePreview.BodyPlainText);
appendLog(hr);
var message = connection.DownloadEntireMessage(envelope.Uid, true);
appendLog(message.BodyPlainText);


envelope.MessagePreview.BodyPlainText contains encoded string. Something like

Quote:
88 =D1=8E=D0=B0=D0=BD=D0=B5=D0=B9, =D0=BE=D0=BA=D0=BE=D0=BB=D0=BE 680 =D1=
=80=D1=83=D0=B1=D0=BB=D0=B5=D0=B9 (=D0=BF=D0=BE =D0=BA=D1=83=D1=80=D1=81=D1=
=83 7.7)


but message.BodyPlainText contains correct cyrillic text.

I can convert MessagePreview.BodyPlainText. For example:

Code:

Encoding.UTF8.GetString(Encoding.Convert(Encoding.GetEncoding("Windows-1251"), Encoding.UTF8, HttpUtility.UrlDecodeToBytes(envelope.MessagePreview.BodyPlainText.Replace('=', '%'))))


But I believe more elegant solution is exists. Isn't it?
Thank you in advance
Back to Top View indapublic's Profile Search for other posts by indapublic
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 19 November 2014 at 3:11am | IP Logged Quote Igor

To help you with that, we would need a test account the issue can be reproduced on. You can send login details privately via HelpDesk.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
indapublic
Newbie
Newbie


Joined: 18 November 2014
Location: Russian Federation
Online Status: Offline
Posts: 8
Posted: 19 November 2014 at 5:10pm | IP Logged Quote indapublic

Thank you. I provide my account info.
Back to Top View indapublic's Profile Search for other posts by indapublic
 

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