Use cchardet to detect the encoding before decode.
Make tox passed.