dump_all_records_bodyfile: fix UnicodeEncodeError bug