Q:

Erlang: convert HTTP GET param to Unicode

I am using connector on Erlang. It gets requests from Javascript like "controler?q=value". If I send a value in Unicode, the browser sends an encoded string.
http://127.0.0.1:8001/controler?q=%D1%82%D0%B5%D1%81%D1%82

How to convert this string to UTF-8?

A:

I wrote a module for similar purpose some time ago: https://gist.github.com/816291
You can use it like this:
io:format("~ts~n",[uri:decode_uri_component("%D1%82%D0%B5%D1%81%D1%82")]).
тест
ok

