tools/logcat: improve handling of input encoding (#14629)

For example, avoid a decoding exception on this line:
```
20:58:28.534 14160            reader.launche  F  thread.cc:1326] Check failed: FindStackTop() > reinterpret_cast<void*>(tlsPtr_.stack_end) (FindStackTop()=X���`���X���, reinterpret_cast<void*>(tlsPtr_.stack_end)=0xbe10c000)
```
This commit is contained in:
Benoit Pierre
2025-11-15 22:56:56 +01:00
committed by GitHub
parent cbcb1d9698
commit dad71c5ca4

View File

@@ -331,6 +331,7 @@ def main():
stdin = sys.stdin
else:
stdin = stack.enter_context(open(args.filter, 'r', encoding=encoding))
stdin.reconfigure(errors='replace')
else:
# Logcat mode.
if args.clear: