Retreiving the body of a message with the correct encoding

Aug 29, 2012 at 10:32 PM

Hello everbody,
I'm trying to retreive a message body (HTML or plain text) with Koolwired.IMAP but I always get broken Special Characters (like german 'Umlaute' are always just a '?' char).

I've tried downloading the body with the following code:

        Dim msg As ImapMailboxMessage = gc.FetchBodyStructure(m)
        Dim txt As String = ""
        If m.HasText Then
          msg = gc.FetchBodyPart(m, m.Text)
          txt = msg.BodyParts(m.Text).Data
        ElseIf m.HasHTML Then
          msg = gc.FetchBodyPart(m, m.HTML)
          txt = msg.BodyParts(m.HTML).Data
        End If

Samples:
Empf?nger >> Should be 'Empfänger'
Datens?tze >> Should be 'Datensätze'

Is there any known workaround for this problem or am I doing something wrong?

Thanks for any reply in advance!
Best Regards