code: def _iri_utf8_errors_handler(exc):
      
  
      bytes_as_ints = bytes_to_list(exc.object[exc.start:exc.end])
      replacements = ['%%%02x' % num for num in bytes_as_ints]
      return (''.join(replacements), exc.end)
docs: Error handler for decoding UTF-8 parts of a URI into an IRI. Leaves byte
      sequences encoded in %XX format, but as part of a unicode string.
  
      :param exc:
          The UnicodeDecodeError exception
  
      :return:
          A 2-element tuple of (replacement unicode string, integer index to
          resume at)