From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 765F43858410; Sat, 11 Mar 2023 00:28:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 765F43858410 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1678494505; bh=bBrdwdBnV9v4wU76y3e0H1hYCn0o5F5LjNNVyBfMbc4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=hSYIlorttt2pX/z3lhu4uX2uSFRKmcbr1hjjP65WpMoHCbTPX0T5S8BoLUFGnoMuk /VLFJr1FBHV4K+Mr1DbPC/iY8x+fYYb13S/RHGNJMhsKPr11l/ad7P4PzMP1sPCe0E L05sgAluCT+V2SnW+HbZNc6Qg6laeKJncPiZQJyM= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug analyzer/109098] Encoding errors on SARIF output for non-UTF-8 source files Date: Sat, 11 Mar 2023 00:28:25 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: analyzer X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: dmalcolm at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109098 --- Comment #2 from Andrew Pinski --- https://gcc.gnu.org/onlinedocs/gcc-12.2.0/gcc/Preprocessor-Options.html#ind= ex-finput-charset Even has the following: -finput-charset=3Dcharset Set the input character set, used for translation from the character set of= the input file to the source character set used by GCC. If the locale does not specify, or GCC cannot get this information from the locale, the default is UTF-8. This can be overridden by either the locale or this command-line opt= ion. Currently the command-line option takes precedence if there=E2=80=99s a con= flict. charset can be any encoding supported by the system=E2=80=99s iconv library= routine. So I think there is a bug in that code ...=