Source Code:
(back to article)
try: byte_string = b'\xa5' # enthält einen ungültigen Startbyte für UTF-8 text = byte_string.decode('utf8') except Exception as e: print(e)
Result:
Report an issue