https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105959

--- Comment #12 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Thanks for the ideas.  If I hack in the following into dg-scan (to force the
scanned file to be treated as UTF-8 as it is read), then the existing case
works with both:
  LC_ALL=C
  LC_ALL=en_US.UTF-8

so perhaps I can do this just for scan-sarif-file

diff --git a/gcc/testsuite/lib/scanasm.exp b/gcc/testsuite/lib/scanasm.exp
index 4b018abcf3d..828002bf6e1 100644
--- a/gcc/testsuite/lib/scanasm.exp
+++ b/gcc/testsuite/lib/scanasm.exp
@@ -59,6 +59,7 @@ proc dg-scan { name positive testcase output_file orig_args }
{
        return
     }
     set fd [open $output_file r]
+    fconfigure $fd -encoding utf-8
     set text [read $fd]
     close $fd

Reply via email to