Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
The come back of url encode
- X-seq: zsh-users 13537
- From: Baptiste Daroussin <baptiste.daroussin@xxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: The come back of url encode
- Date: Fri, 5 Dec 2008 18:50:14 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:date:from:to:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=PgSV7pjmO6Xr80rmJpkEs6a8LEbgvzaJsapMs//TeeQ=; b=wvQphp0hT64t8dYWPP0vq3AXvrgj05ojk4BRtPO9PnCjHoay6z1ZqGsrQ9FublqBII x4GjoOOcRyDiXrCb9yfSIl41aJKEdoJebJ4s/pvZ4N+i/ysOHQN7vbZODuy6BNL9kcU9 2yIT2zW3UW6xtys4Cq+zbwbHr47oIkwjErgFw=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=ZQlyI1iH3xIPKCE1StWjUAYiDWDQw0IXKS0hUhX2Xbw2PNOBMwlCPgS19ssR1kid8q 12ZrVx4SjfEb7BwRWwWMFK89lCOipZnrqhr5zleCFfb+N6sSjo9X2G/mIBLxUFbCiUlv +yjS1hjxp+D9UhFvMPgxD5fAi0eZ/mUbbskuA=
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
Hi,
a long time ago, Bart Schaefer sent this
http://www.zsh.org/mla/users//2005/msg01328.html
I find a bug in this with some special characters so here is a fix for those
interested in :
${(j::)input/(#b)([^A-Za-z0-9_.!~*\'\(\)-])/%${(l:2::0:)$(([##16]#match))}}
We need padding the resulting hexadecimal code to match the RFC, because the tab
code (\t) return %9 which is wrong instead of %09.
I though it could be interesting to post that.
regards
---
Bapt
Messages sorted by:
Reverse Date,
Date,
Thread,
Author