From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#37633: Column part interpreted wrong in compilation mode Date: Sun, 06 Oct 2019 20:16:43 +0300 Message-ID: <83h84l3ibo.fsf@gnu.org> References: <2282407.NbK4RY0fEn@daiyu> <4972654.EqVlIXum5b@daiyu> <83pnjb2ee9.fsf@gnu.org> <1734660.yQRGRn46K7@daiyu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="163140"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 37633@debbugs.gnu.org, anton@mips.complang.tuwien.ac.at To: Bernd Paysan Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 06 19:17:11 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iHA9e-000gIJ-Ir for geb-bug-gnu-emacs@m.gmane.org; Sun, 06 Oct 2019 19:17:10 +0200 Original-Received: from localhost ([::1]:35956 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iHA9d-00075K-BX for geb-bug-gnu-emacs@m.gmane.org; Sun, 06 Oct 2019 13:17:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36997) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iHA9Y-00075C-5D for bug-gnu-emacs@gnu.org; Sun, 06 Oct 2019 13:17:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iHA9X-0000n1-48 for bug-gnu-emacs@gnu.org; Sun, 06 Oct 2019 13:17:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37945) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iHA9X-0000mu-14 for bug-gnu-emacs@gnu.org; Sun, 06 Oct 2019 13:17:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iHA9W-0007di-ML for bug-gnu-emacs@gnu.org; Sun, 06 Oct 2019 13:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 06 Oct 2019 17:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37633 X-GNU-PR-Package: emacs Original-Received: via spool by 37633-submit@debbugs.gnu.org id=B37633.157038222029354 (code B ref 37633); Sun, 06 Oct 2019 17:17:02 +0000 Original-Received: (at 37633) by debbugs.gnu.org; 6 Oct 2019 17:17:00 +0000 Original-Received: from localhost ([127.0.0.1]:46766 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iHA9U-0007dO-CE for submit@debbugs.gnu.org; Sun, 06 Oct 2019 13:17:00 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:56122) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iHA9R-0007d7-R2 for 37633@debbugs.gnu.org; Sun, 06 Oct 2019 13:16:58 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:60184) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iHA9K-0000YG-L3; Sun, 06 Oct 2019 13:16:50 -0400 Original-Received: from [176.228.60.248] (port=4761 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iHA9J-0003aR-Jt; Sun, 06 Oct 2019 13:16:50 -0400 In-reply-to: <1734660.yQRGRn46K7@daiyu> (message from Bernd Paysan on Sat, 05 Oct 2019 21:24:17 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:168434 Archived-At: > From: Bernd Paysan > Cc: 37633@debbugs.gnu.org, anton@mips.complang.tuwien.ac.at > Date: Sat, 05 Oct 2019 21:24:17 +0200 > > > But the column numbers are counted in the compiler output, and no one > > said that the compiler output must be encoded the same as the source > > file. > > The column numbers are written as decimal digits in the compiler output. They > are not even calculated, they are just extracted. > > Indeed, the compiler output can be in a different encoding, but it doesn't > matter. The navigation that needs to change is in the source code file. This > is compiler output from compiling an iso-latin encoded file, the compiler > output itself is utf-8: > > test-iso.c:3:23: error: ‘c’ undeclared (first use in this function) > 3 | printf("test��� %i", c); > | ^ > > The 23(-1) are the numbers of bytes to get from the start of line to the > missing variable 'c'. The three � are there, because the compilation buffer > contains invalid characters now. They are iso-latin characters, invalid in > utf-8. But this is irrelevant. All the compilation mode does is extract the > test-iso.c (file name), 3 (line number) and 23 (byte index). Navigation > happens in test-iso.c, it's a file (the C compiler can't access emacs > buffers), autodetection is pretty reliable. Sorry, now I'm confused. Does the compiler count bytes in its output (where a Latin-1 line could be recoded in UTF-8, and thus have a different number of bytes), or does it count bytes in the original file (in this case encoded in Latin-1, i.e. 1 byte per character)?