def uri_to_iri(uri):
 if (uri is None):
  return uri
 uri = force_bytes(uri)
 iri = unquote_to_bytes(uri)
 return repercent_broken_unicode(iri).decode('utf-8')

def uri_to_iri ( uri ) : if ( uri is None ) : return uri uri = force_bytes ( uri ) iri = unquote_to_bytes ( uri ) return repercent_broken_unicode ( iri ) . decode ( 'utf-8' )
converts a uri in a given charset to a iri .