Use chardet to detect non-ascii buffer