netinst.dms: fix a bug that garbage is attached to the end of the file that was converted from UTF-8 to Shift_JIS