Home > Back-end >  Turn to base64 decoding problems
Turn to base64 decoding problems

Time:09-27

Delphi xe7 update1 + indy10.6 email, there is a message headers and the body contains characters are garbled, will IdMessage1 NoDecode:=True; And NoEncode:=True; Save as. Eml files, open the text displayed a normal Chinese characters with Foxmail,
With base64 decoding function DecodeString (IdMessage1. Body. The Text). Error:


The eml file part of the content is as follows:
Subject:?????????????????????? 360????????????????????????????????????????????????????????
X - PHP - Originating - Script: 1017: func. PHP
MIME - Version: 1.0 an rn
The content-type: text/HTML
From: 360?????????????????? The Content - Transfer - Encoding: base64
X - MIME - Autoconverted: from 8 bit to base64 by se4.white.zwt.qihoo.net id t5H7Xtwt015350

PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBYSFRNTCAxLjAgVHJhbnNpdGlv
BmFsLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL1RSL3hodG1sMS9EVEQveGh0bWwxLXRyYW5z
AXRpb25hbC5kdGQiPg0KPGh0bWwgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGh0
BWwiPg0KPGhlYWQ + DQo8bWV0YSBodHRwLWVxdWl2PSJDb250ZW50LVR5cGUiIGNvbnRlbnQ9
InRleHQvaHRtbDsgY2hhcnNldD1HQjIzMTIiIC8 + DQo8dGl0bGU + zt6x6szizsS1tTwvdGl0
BGU + DQo8c3R5bGU + DQoqe21hcmdpbjowcHg7cGFkZGluZzowcHg7Zm9udC1zaXplOjEycHg7
IGxpbmUtaGVpZ2h0OjEuODsgZm9udC1mYW1pbHk6QXJpYWw7fQ0KYXtjb2xvcjojMDA2N2I2
O3RleHQtZGVjb3JhdGlvbjpub25lfQ0KYTpob3Zlcnt0ZXh0LWRlY29yYXRpb246bm9uZTt9
DQo8L3N0eWxlPg0KPC9oZWFkPg0KDQo8Ym9keT4NCjx0YWJsZSB3aWR0aD0iNjg2IiBhbGln
Bj0iY2VudGVyIiBjZWxsc3BhY2luZz0iMTAiIHN0eWxlPSJib3JkZXItYm90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
MDA7Ij6xvtPKvP7Oqs + 1 zbpx1lavt6llzaosx + vO8NaxvdO72Li0o6E8L3RkPg0KICAgIDx0
ZCBhbGlnbj0icmlnaHQiPjM2MMjtvP6/qrfFxr3MqDxiciAvPg0KICAgIDIwMTXE6jA21MIx
N8jVPC90ZD4NCiAgPC90cj4NCjwvdGFibGU + DQo8L2JvZHk + DQo8L2h0bWw + DQoNCg==

CodePudding user response:

This should be the system character set does not match,

CodePudding user response:

Subject:?????????????????????? 360????????????????????????????????????????????????????????

This should not be such? What is the content of the original message?

CodePudding user response:

reference 1st floor lyhoo163 response:
this should be the system character set do not match,

What is a good solution

CodePudding user response:

refer to the second floor frank_lee_cn response:
Subject:???????????????????? 360????????????????????????????????????????????????????????

This should not be such? What is the content of the original message?

Regardless of the title, can save the eml file text Foxmail open display is normal, that the body part of the receiving is right, now care about Delphi xe7 display how to complete it,

CodePudding user response:

The base64 should not standard base64 algorithm is so simple, there must be other algorithm
Direct decoding resolution not to come out

CodePudding user response:

Title the right of access to information,
  • Related