main.py: Running... == get_from_buffer == buffer='example # H\xe9llo', charset=None: 'example # H\xe9llo' buffer='example # H\xeallo', charset='': 'example # H\xeallo' buffer='example # H\xebllo', charset='utf-8': TypeError: `charset` must be null when the buffer is Unicode buffer=b'example # H\xe9llo', charset=None: 'example # H\xe9llo' buffer=b'example # H\xeallo', charset='': 'example # H\xeallo' buffer=b'example # H\xebllo', charset='iso-8859-1': 'example # H\xebllo' buffer=b'example # H\xecllo', charset='utf-8': diagnostics: 1:1-1:1: Expected 'example', got Termination 1:12-1:12: Could not decode source as "utf-8" buffer=b'example # H\xecllo', charset='unknown-charset': diagnostics: Unknown charset "unknown-charset" 1:1-1:1: Expected 'example', got Termination buffer=b'example # H\xc3\xa9llo', charset='utf-8': 'example # H\xe9llo' buffer=b'example # H\xc3\xa9llo', charset=None: 'example # H\xc3\xa9llo' == reparse == buffer='example # H\xe9llo', charset=None: 'example # H\xe9llo' buffer='example # H\xeallo', charset='': 'example # H\xeallo' buffer='example # H\xebllo', charset='utf-8': TypeError: `charset` must be null when the buffer is Unicode buffer=b'example # H\xe9llo', charset=None: 'example # H\xe9llo' buffer=b'example # H\xeallo', charset='': 'example # H\xeallo' buffer=b'example # H\xebllo', charset='iso-8859-1': 'example # H\xebllo' buffer=b'example # H\xecllo', charset='utf-8': diagnostics: 1:1-1:1: Expected 'example', got Termination 1:12-1:12: Could not decode source as "utf-8" buffer=b'example # H\xecllo', charset='unknown-charset': diagnostics: Unknown charset "unknown-charset" 1:1-1:1: Expected 'example', got Termination buffer=b'example # H\xc3\xa9llo', charset='utf-8': 'example # H\xe9llo' buffer=b'example # H\xc3\xa9llo', charset=None: 'example # H\xc3\xa9llo' main.py: Done. Done