Re: add mailto: support to exmhcomp (+patch)

Alexander Zangerl <[email protected]> Mon, 21 Mar 2005 21:37:20 +1000
Newsgroups gmane.mail.exmh.devel
Message-ID <[email protected]>
On Thu, 17 Mar 2005 16:38:04 PST, Brent Welch writes:
>I'm all for making the ancient decoder more useful.
>Would ncgi::decode suffice ?
>
>proc ::ncgi::decode {str} {
>    # rewrite "+" back to space
>    # protect \ from quoting another '\'
>    set str [string map [list + { } "\\" "\\\\"] $str]
>
>    # prepare to process all %-escapes
>    regsub -all -- {%([A-Fa-f0-9][A-Fa-f0-9])} $str {\\u00\1} str
>
>    # process \u unicode mapped chars
>    return [subst -novar -nocommand $str]
>}

i don't think it'll work properly: mapping the + away is certainly not
a good idea. apart from that the decoding looks fine.

another problem is that if the code surrounding the decode function
does split on &, the & will have to be escaped beforehand.

regards
az


-- 
+ Alexander Zangerl + DSA 42BD645D + (RSA 5B586291)
C++ is history repeated as tragedy. Java is history repeated as farce.
 -- Scott McKay

_______________________________________________
Exmh-workers mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/exmh-workers
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFCPrINpy/2bEK9ZF0RAlqdAJ49c0Kl3PKC1ZSGCUsPc93b4KmHKwCfeGxl
QCeMnin+ilYsU9UKAYWAlqo=
=pKfU
-----END PGP SIGNATURE-----