This repository has been archived by the owner on Jan 14, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TerminalEmulator: conform to standard on handling of invalid UTF-8 se…
…quences The Unicode standard requires that, when dealing with ill-formed UTF-8 (version 6.2, page 96): If the converter encounters an ill-formed UTF-8 code unit sequence which starts with a valid first byte, but which does not continue with valid successor bytes [...], it must not consume the successor bytes as part of the ill-formed subsequence whenever those successor bytes themselves constitute part of a well-formed UTF-8 code unit subsequence. This implies that when we hit a byte in the input stream which cannot fit into the sequence currently being decoded, we must attempt to decode that byte again after resetting our decoder state.
- Loading branch information