When collecting program output for bug reports, cope with invalid UTF-8 being