-Fix: better UTF-8 detection