Page 1 of 1

POP3 decoder - Rfc 2047

Posted: Fri Dec 26, 2003 5:45 am
by eddy
Is there a DLL to decode this sort of mail subject ?
Subject: =?iso-8859-1?Q?Joe?= is =?utf-8?funny=? in prose

I've found a Doc, it is too much technical for me.
:arrow: Rfc 2047

Posted: Fri Dec 26, 2003 11:21 am
by El_Choni
there is an userlib: CGI (URLDecode), but it's easy to do it on your own with theStringField() command. They are value pairs:

URL$ = "URL?name=1=value1&name2=value2"

Code: Select all

Structure pair
  name.s
  value.s
EndStructure
NewList Parameters.pair()
URL$ = Right(URL$, Len(URL$)-FindString(URL$, "?", 1))
i = 1
ThisPair$ = StringField(URL$, i, "&")
While ThisPair$
  AddElement(Parameters())
  Parameters()\name = StringField(ThisPair$, 1, "=")
  Parameters()\value = StringField(ThisPair$, 2, "=")
  i+1
  ThisPair$ = StringField(URL$, i, "&")
Wend
Hope this works, can't test it. Have a nice day,

Posted: Fri Dec 26, 2003 11:52 am
by eddy
it's not a URL, it is a encoded string : the result of POP3 transaction.

Posted: Fri Jan 02, 2004 5:52 pm
by willib
HI

If you get a solution tell it to me please I have the same problem

Willi

Posted: Fri Jan 02, 2004 6:59 pm
by Wayne Diamond
I'll write some UUEncode/UUDecode functions tomorrow, currently 2am here so too late to start now

Posted: Sat Jan 03, 2004 8:29 am
by Wayne Diamond
Here is a UUEncode \ UUDecode demo:
viewtopic.php?t=8989

Regards,
Wayne