Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

The come back of url encode



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