def _urlencode(items):
    try:
        return urllib.urlencode(items)
    except UnicodeEncodeError:
        return urllib.urlencode([(k, smart_str(v)) for k, v in items])
A Unicode-safe URLencoder.
dataset/ETHPy150Open mozilla/pontoon/pontoon/base/templatetags/helpers.py/_urlencode