Use chardet to detect header encoding.