Skip to main content

utf8_py_error

No overview available.

def utf8_py_error(
error: UnicodeError
) - > str

Handles errors encountered during UTF-8 encoding or decoding by raising a UnicodeError or applying a replacement strategy.

Parameters

NameTypeDescription
errorUnicodeErrorThe exception object containing details about the encoding or decoding failure.

Returns

TypeDescription
strThe processed string or replacement character sequence based on the error handling policy.