def _urlencode(params): """ A version of Python's urllib.urlencode() function that can operate on unicode strings. The parameters are first case to UTF-8 encoded strings and then encoded as per normal. """ return url_encode([i for i in _generate_smart_str(params)])