From dad71c5ca403cc5813404533b6c2c0cbb1f3b2e7 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Sat, 15 Nov 2025 22:56:56 +0100 Subject: [PATCH] tools/logcat: improve handling of input encoding (#14629) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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(tlsPtr_.stack_end) (FindStackTop()=X���`���X���, reinterpret_cast(tlsPtr_.stack_end)=0xbe10c000) ``` --- tools/logcat.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/logcat.py b/tools/logcat.py index d64b5e8b0..4cc5f9fb5 100755 --- a/tools/logcat.py +++ b/tools/logcat.py @@ -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: