[racket] escaping binary data in url

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Fri Aug 12 14:13:14 EDT 2011

That's what the Web Server stuffers do

http://docs.racket-lang.org/web-server/stateless.html#(part._stuffers)

On Fri, Aug 12, 2011 at 11:38 AM, Danny Yoo <dyoo at cs.wpi.edu> wrote:
> The library already does some URL encoding for you, as "%" is an
> illegal character in a query string, since that's the escape character
> itself for arbitrary bytes,  "%25" gets translated down to...
>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
>> (integer->char (string->number "25" 16))
> #\%
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
>
> ... that percent sign.
>
>
> Would using base64-encode (from the net/base64 library) work for you?
> You can take your bytes and feed them through base64-encode; the
> result should be something that can be a part of URLs.
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/users
>



-- 
Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University
http://faculty.cs.byu.edu/~jay

"The glory of God is Intelligence" - D&C 93



Posted on the users mailing list.