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

Re: rfc2396 url encoding



Bart Schaefer wrote:
> What happens if you simply unsetopt multibyte within the function?
> 
>   urlencode() {
>     setopt localoptions extendedglob nomultibyte
>     input=( ${(s::)1} )
>     print ${(j::)input/(#b)([^A-Za-z0-9_.!~*\'\(\)-])/%$(([##16]#match))}
>   }

That's supposed to work and is the approved method of treating strings
as individual bytes.  I haven't tried it since the last thing I need at
the moment is being drawn into another bug fix.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php

To get further information regarding CSR, please visit our Investor Relations page at http://ir.csr.com/csr/about/overview



Messages sorted by: Reverse Date, Date, Thread, Author