fix utf-8 assumption