utf-8 detection fixed