mirror of
https://github.com/koreader/koreader.git
synced 2025-12-13 20:36:53 +01:00
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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user