modify scripts to work with single-byte charset.