decoding "quoted-printable"

Mark Smith mark at maseurope.net
Tue Jun 5 05:47:07 EDT 2007


Klaus, this is a function from an old project that worked well enough  
for its purpose...maybe good enough for your needs?

function decodeQP pStr
   put 0 into tc
   repeat for each char c in pStr
     if c is "=" then put 1 into tc
     if tc = 0 then
       put c after decodedStr
     else
       if c is not "=" then
         put c into char tc of hexVal
         add 1 to tc
       end if
       if tc = 3 then
         put numToChar(baseConvert(hexVal,16,10)) after decodedStr
         put 0 into tc
       end if
     end if
   end repeat
   return decodedStr
end decodeQP

Best,

Mark

On 5 Jun 2007, at 09:44, Klaus Major wrote:

> Hi friends,
>
> anyone already created a routine to decode "quoted-printable"  
> encoded stuff?
>
> M$ still uses this long deprecated format (especially in vCards  
> exported from MS Outlook)
> and is driving me nuts :-)
>
> Any hints that will save me the rest of my hair are very welcome!
>
>
> Best
>
> Klaus Major
> klaus at major-k.de
> http://www.major-k.de
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list