GNU bug report logs - #61726
[PATCH] Eglot: Support positionEncoding capability

Previous Next

Package: emacs;

Reported by: Augusto Stoffel <arstoffel <at> gmail.com>

Date: Thu, 23 Feb 2023 08:06:01 UTC

Severity: normal

Tags: patch

Done: João Távora <joaotavora <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #128 received at 61726 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: João Távora <joaotavora <at> gmail.com>
Cc: 61726 <at> debbugs.gnu.org, arstoffel <at> gmail.com
Subject: Re: bug#61726: [PATCH] Eglot: Support positionEncoding capability
Date: Fri, 24 Feb 2023 15:51:39 +0200
> From: João Távora <joaotavora <at> gmail.com>
> Date: Fri, 24 Feb 2023 13:45:23 +0000
> Cc: Augusto Stoffel <arstoffel <at> gmail.com>, 61726 <at> debbugs.gnu.org
> 
> On Fri, Feb 24, 2023 at 1:34 PM Eli Zaretskii <eliz <at> gnu.org> wrote:
> >
> > > You can't even send or receive a message through the JSONRPC channel if
> > > it's not valid UTF-8
> 
> > That's because we _decided_ to behave like that.  A decision that is
> > not carved in stone.
> 
> At least or LSP, it seems it must be UTF-8:

This is a misunderstanding: I didn't mean to say that we should send
invalid UTF-8 sequences.  I meant something else.  Quote from the rest
of my message:

> > and `json-serialize' rightfully emits an error.
> 
> There's no "rightfully" here.  It's our decision to signal an error in
> this case.  Substituting some innocent character for the unencodable
> ones would be an entirely legitimate alternative.
> [...]
> See above: replacing problematic characters would also solve this
> problem.  Some other applications out there actually behave like that.

That's the alternative: replace the unencodable character with some
replacement.

> I don't see how this is relevant to the code-point counting problem here,
> though.

It started when I said we cannot count bytes in the internal
representation of text when we need to produce UTF-8 bytes.




This bug report was last modified 2 years and 138 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.