There would appear to be two encodings that are useful:
1) RFC 3986 (the current URI spec)
2) application/x-www-form-urlencoded (as per RFC 1738,
except for that space characters are replaced by '+')
There are numerous existing Erlang implementations already in use,
including mochiweb_util, yaws_api, ibrowse_lib, and oauth_uri
(disclaimer:
i wrote the last one). There are others (such as erlydtl and smak)
which
appear to be based on the mochiweb code.
>From my testing, neither mochiweb_util or yaws_api implement either of
the above encodings correctly, ibrowse_lib correctly implements the
second
encoding, oauth_uri correctly implements the first encoding, and
ibrowse
is faster than all the other implementations.
Code is available to view/download here:
http://github.com/tim/erlang-percent-encoding
This includes the four existing implementations above, plus an
additional
implementation based on ibrowse_lib which implements both encodings.
I would be grateful for any feedback on this. Does such a proposal
warrant
an EEP? Are my tests correct? Any other thoughts?