[fix] properly handle unicode chars in str type