'replace' - Replace the invalid bytes with the unicode replacement
character � (U+FFFD).
'surrogateescape' - Encode invalid bytes as a surrogate code of
U+DC00 + invalid_byte. This is the same strategy Python uses for
interfacing with the operating system.
Encoding error handling methods of getPass.
'strict'- Throw an Error.'ignore'- Ignore the invalid bytes.'replace'- Replace the invalid bytes with the unicode replacement character � (U+FFFD).'surrogateescape'- Encode invalid bytes as a surrogate code ofU+DC00 + invalid_byte. This is the same strategy Python uses for interfacing with the operating system.