guess and convert file encoding to utf-8