https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109098
--- Comment #4 from David Malcolm <dmalcolm at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #2) > So I think there is a bug in that code ... The issue is in sarif_builder::maybe_make_artifact_content_object, which uses; char *text_utf8 = maybe_read_file (filename); where there's no guarantee that "text_utf8" is (ahem) actually utf-8. Sorry about that. Working on a fix to make it use the input.cc source-quoting machinery, which should handle encoding.