These functions will take UTF8 text and url encode it, and vice versa.
url_encode(text-in-utf8)
returns a url encoded string.
url_decode(url-encoded_string)
returns a UTF8 text.
Execute the scripts.
MIT for my stuff but loosely based on Garrett Hill's url_decode and url_encode functions.