encoding and decoding for url-encoded binary strings in erlang