zsh-users
 help / color / mirror / code / Atom feed
* The come back of url encode
@ 2008-12-05 17:50 Baptiste Daroussin
  0 siblings, 0 replies; only message in thread
From: Baptiste Daroussin @ 2008-12-05 17:50 UTC (permalink / raw)
  To: zsh-users

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-12-05 17:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-05 17:50 The come back of url encode Baptiste Daroussin

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).