fix(terminal): comments utf-8 chunk accumulator
Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
parent
5a65d45244
commit
6a53757f68
1 changed files with 6 additions and 0 deletions
|
|
@ -612,6 +612,12 @@ fn find_utf8_split_point(buf: &[u8]) -> usize {
|
|||
buf.len()
|
||||
}
|
||||
|
||||
// Terminal output currently follows a UTF-8 text model end to end: the service
|
||||
// keeps replay buffers on UTF-8 boundaries, and Flutter decodes payload bytes as
|
||||
// UTF-8 before writing to xterm. This accumulator only prevents splitting a
|
||||
// trailing UTF-8 code point across PTY reads. Supporting non-UTF-8 terminals
|
||||
// would need a separate design covering remote encoding detection, Flutter
|
||||
// decoding, replay truncation, and input transcoding.
|
||||
#[derive(Default)]
|
||||
struct Utf8ChunkAccumulator {
|
||||
remainder: Vec<u8>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue