POP3 decoder - Rfc 2047

Just starting out? Need help? Post your questions and find answers here.
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

POP3 decoder - Rfc 2047

Post 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
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
El_Choni
TailBite Expert
TailBite Expert
Posts: 1007
Joined: Fri Apr 25, 2003 6:09 pm
Location: Spain

Post 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,
El_Choni
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Post by eddy »

it's not a URL, it is a encoded string : the result of POP3 transaction.
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
willib
User
User
Posts: 39
Joined: Mon Sep 15, 2003 7:04 pm
Location: Bielefeld

Post by willib »

HI

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

Willi
Wayne Diamond
User
User
Posts: 38
Joined: Tue Dec 30, 2003 1:37 pm
Location: Australia

Post by Wayne Diamond »

I'll write some UUEncode/UUDecode functions tomorrow, currently 2am here so too late to start now
Wayne Diamond
User
User
Posts: 38
Joined: Tue Dec 30, 2003 1:37 pm
Location: Australia

Post by Wayne Diamond »

Here is a UUEncode \ UUDecode demo:
viewtopic.php?t=8989

Regards,
Wayne
Post Reply