Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: rfc2396 url encoding
- X-seq: zsh-workers 23321
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: rfc2396 url encoding
- Date: Wed, 25 Apr 2007 10:21:13 +0100
- In-reply-to: <070424232221.ZM23158@xxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20051106185713.GA11612@xxxxxxxxxxx> <1051106194911.ZM32000@xxxxxxxxxxxxxxxxxxxxxxx> <20070425034745.GA11136@xxxxxxxxxxx> <070424232221.ZM23158@xxxxxxxxxxxxxxxxxxxxxx>
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