fix non-unicode reading