Interface Unknown
Interface Unknown

Reputation: 713

Indy IMAP4 does not display German symbols correctly

I am using TIdIMAP4 component to fill the string grid with the messages of my GMail mailbox.

var IMAPClient: TIdIMAP4;

Some messages have German umlauts. When I call IMAPClient.RetrieveAllHeaders(MyMsgList) the string grid is populated as expected (all umlauts are displayed) but there are no UIDs however (I guess that RetrieveAllHeaders just doesn't fetch UIDs).

When I call IMAPClient.UIDRetrieveAllEnvelopes(MyMsgList) all additional attributes of a Messages are there, but the headers are displayed in abracadabra (=?ISO-8859-1?Q?_Die_Br=FCcke_von_Arnheim?=) // Shall be 'Die Brücke von Arnheim'.

I've read many supportive posts but could not find the answer why IndyIMAP4 treats German symbols incorrectly. Any ideas?

Upvotes: 2

Views: 232

Answers (1)

Remy Lebeau
Remy Lebeau

Reputation: 595827

RetrieveAllHeaders() decodes the raw data it retrieves. UIDRetrieveAllEnvelopes() retrieves the raw data only, it does not decode. You can decode the raw headers manually by calling Indy's DecodeHeader() function in the IdCoderHeader unit.

Upvotes: 3

Related Questions