BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

UTF-8 in the subject

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock
View previous topic :: View next topic  
Author Message
Daniel Manchester
Guest





PostPosted: Thu Mar 17, 2005 9:14 pm    Post subject: UTF-8 in the subject Reply with quote



I am using idpop3 and idmessage [indy 10] and I occassionally get a message
with a subject like the following
=?utf-8?B?QUNIIFBheW1lbnQgTm90aWZpY2F0aW9u?=

when I save the message to file and open in outlook the subject is ACH
Payment Notification

What do I have to do to convert this so that I can read it? Thanks



Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Thu Mar 17, 2005 10:06 pm    Post subject: Re: UTF-8 in the subject Reply with quote




"Daniel Manchester" <dmanchester (AT) earthlink (DOT) net> wrote


Quote:
I am using idpop3 and idmessage [indy 10] and I occassionally
get a message with a subject like the following

That is using UTF-8 encoding. Indy does not currently support UTF-8 in
encoded header values.

Quote:
What do I have to do to convert this so that I can read it?

Parse it manually. The 'B' between the second and third '?' characters
specifies that the data is encoded in base64. Everything between the third
and fourth '?' characters are the actual data. If you are using D6+, the
VCL has functions for decoding UTF-8 strings, and Indy has functions for
decoding base64. So you would first decode the base64 to get the UTF-8, and
then decode that into the original string.


Gambit




Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.