pygtail
pygtail copied to clipboard
Use "backslashreplace" for encoding errors
When encountering bytes that are not of the expected encoding the file read throws an exception and stops reading completely.
This commit will replace the bytes with an escaped sequence.
More info: https://docs.python.org/3/library/io.html#io.TextIOWrapper
Good catch. Would it be possible to add a test case for this?
Will do