... use the method `backslashreplace` to deal with non-UTF8 characters. See https://docs.python.org/3/library/codecs.html#error-handlers
... use the method `backslashreplace` to deal with non-UTF8 characters. See https://docs.python.org/3/library/codecs.html#error-handlers