code: def urlencode_utf8(params):
      
      if hasattr(params, 'items'):
          params = params.items()
      params = (
          '='.join((
              quote_plus(k.encode('utf8'), safe='/'),
              quote_plus(v.encode('utf8'), safe='/')
          )) for k, v in params
      )
      return '&'.join(params)
docs: UTF-8 safe variant of urllib.urlencode.
      http://stackoverflow.com/a/8152242