unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Bernd Paysan <bernd@net2o.de>
Cc: 37633@debbugs.gnu.org, anton@mips.complang.tuwien.ac.at
Subject: bug#37633: Column part interpreted wrong in compilation mode
Date: Sun, 06 Oct 2019 20:16:43 +0300	[thread overview]
Message-ID: <83h84l3ibo.fsf@gnu.org> (raw)
In-Reply-To: <1734660.yQRGRn46K7@daiyu> (message from Bernd Paysan on Sat, 05 Oct 2019 21:24:17 +0200)

> From: Bernd Paysan <bernd@net2o.de>
> 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)?





  reply	other threads:[~2019-10-06 17:16 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-05 11:12 bug#37633: Column part interpreted wrong in compilation mode Bernd Paysan via Bug reports for GNU Emacs, the Swiss army knife of text editors
2019-10-05 16:08 ` Eli Zaretskii
2019-10-05 16:16   ` Eli Zaretskii
2019-10-05 17:05     ` Bernd Paysan via Bug reports for GNU Emacs, the Swiss army knife of text editors
2019-10-05 18:53       ` Eli Zaretskii
2019-10-05 18:54         ` Bernd Paysan via Bug reports for GNU Emacs, the Swiss army knife of text editors
2019-10-05 19:14           ` Eli Zaretskii
2019-10-05 19:24             ` Bernd Paysan via Bug reports for GNU Emacs, the Swiss army knife of text editors
2019-10-06 17:16               ` Eli Zaretskii [this message]
2019-10-06 17:35                 ` Bernd Paysan via Bug reports for GNU Emacs, the Swiss army knife of text editors
2019-10-06 18:54                   ` Eli Zaretskii
2019-10-06 19:16                     ` Bernd Paysan via Bug reports for GNU Emacs, the Swiss army knife of text editors
2019-10-05 17:34     ` Bernd Paysan via Bug reports for GNU Emacs, the Swiss army knife of text editors
2019-10-06 12:31     ` Anton Ertl
2019-10-06 17:53       ` Eli Zaretskii
2019-10-06 19:02         ` Bernd Paysan via Bug reports for GNU Emacs, the Swiss army knife of text editors
2019-10-06 19:16           ` Eli Zaretskii
2019-10-06 19:22             ` Bernd Paysan via Bug reports for GNU Emacs, the Swiss army knife of text editors
2019-10-06 19:34               ` Eli Zaretskii
2019-10-06 19:35                 ` Bernd Paysan via Bug reports for GNU Emacs, the Swiss army knife of text editors
2019-10-07  7:09         ` Anton Ertl
2019-10-05 16:58   ` Bernd Paysan via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-04-23 13:36 ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83h84l3ibo.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=37633@debbugs.gnu.org \
    --cc=anton@mips.complang.tuwien.ac.at \
    --cc=bernd@net2o.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).