Author |
|
indapublic Newbie
Joined: 18 November 2014 Location: Russian Federation
Online Status: Offline Posts: 8
|
Posted: 18 November 2014 at 9:06pm | IP Logged
|
|
|
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 |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 19 November 2014 at 3:11am | IP Logged
|
|
|
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 |
|
|
indapublic Newbie
Joined: 18 November 2014 Location: Russian Federation
Online Status: Offline Posts: 8
|
Posted: 19 November 2014 at 5:10pm | IP Logged
|
|
|
Thank you. I provide my account info.
|
Back to Top |
|
|