def _fix_query_encoding(parse_result):
 query_params = parse_qsl(parse_result.query, keep_blank_values=True)
 return parse_result._replace(query=urllib.urlencode(query_params))

def _fix_query_encoding ( parse_result ) : query_params = parse_qsl ( parse_result . query , keep_blank_values = True ) return parse_result . _replace ( query = urllib . urlencode ( query_params ) )
fix encoding in the query string .