Use chardet to guess the character encoding when on python3