Antoine Pitrou added the comment: > Necessary when comparing files with unknown or inconsistent encodings: > there's no way to convert everything to Unicode, so just leave it all > bytes.
You could simply use the surrogateescape error handler. ---------- nosy: +pitrou _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17445> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com