Received: (at 79682) by debbugs.gnu.org; 25 Nov 2025 20:19:04 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 25 15:19:03 2025 Received: from localhost ([127.0.0.1]:41674 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vNzV9-0000Y7-3h for submit <at> debbugs.gnu.org; Tue, 25 Nov 2025 15:19:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53158) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1vMkCh-0000Tc-Ty for 79682 <at> debbugs.gnu.org; Sat, 22 Nov 2025 04:46:52 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1vMkCH-0004KC-JC; Sat, 22 Nov 2025 04:46:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=ZaPZvCjPAT48IrPOnMUtCwscny8vOWZvZ3zIJXG7jFI=; b=DJ72AgSHdh4NhS32j4g4 zpT5OT9FbVbBPSf1KdvL4Mv24LRYOwUTsYqLVVMTL+Rx2gH8YfrXObO+CdMVr6Dj8Z84fkDkk8BzT eWaf8iDrwgEXaxunE+mCYPRpun9eM3gUgldphrTBxswntLAkXnqaKfldCcM9FlGzl6D/w7G1F+t02 +baAGVNh+/CweWU5QWarAM0gDFDvste2ZGIgd73D+MH0bPlwrHd1e1utS2vfAnVXnAMH7DRyYLJtT y7hzjxR7Mg63ojJ4ova2USerVpUXDJbG5KdOozuQYbGBG0U0hOurJLKzc7e9yFoulL31/wgNGHSRH MMqp7Q9WqZUeIw==; Date: Sat, 22 Nov 2025 11:46:14 +0200 Message-Id: <86y0nyfli1.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: isouthrain@HIDDEN In-Reply-To: <86qzu87pua.fsf@HIDDEN> (message from Eli Zaretskii on Sat, 08 Nov 2025 12:58:53 +0200) Subject: Re: bug#79682: 31.0.50; Eglot does not support buffers containing special characters. References: <87frba6rhn.fsf@HIDDEN> <86347auii0.fsf@HIDDEN> <CALDnm51Qm73we9AFQKWLwbLFPmLOZ4AqFMQb8Y=f72LGSDjK7Q@HIDDEN> <86ms5gu889.fsf@HIDDEN> <875xc45jl4.fsf@HIDDEN> <86qzursbmd.fsf@HIDDEN> <87v7k23vky.fsf@HIDDEN> <86qzu87pua.fsf@HIDDEN> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79682 Cc: p.stephani2@HIDDEN, joaotavora@HIDDEN, 79682 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Ping! Ping! Could someone please tell how other LSP clients handle invalid codepoints? > Cc: isouthrain@HIDDEN, 79682 <at> debbugs.gnu.org > Date: Sat, 08 Nov 2025 12:58:53 +0200 > From: Eli Zaretskii <eliz@HIDDEN> > > Ping! Can someone please look and tell how other LSP clients handle > these situations? > > Philipp, can you tell why we insist on rejecting invalid Unicode > characters instead of replacing them, even as an option? > > > From: João Távora <joaotavora@HIDDEN> > > Cc: Philipp Stephani <p.stephani2@HIDDEN>, isouthrain@HIDDEN, > > 79682 <at> debbugs.gnu.org > > Date: Sun, 26 Oct 2025 08:39:57 +0000 > > > > Eli Zaretskii <eliz@HIDDEN> writes: > > > > > Maybe. At the time, the people who worked on json.c (Philipp, AFAIR) > > > were very adamant that we should flatly reject non-Unicode characters. > > > > Now you mention, I do remember much adamance, but I never got the point. > > > > > I suggested to do this in Eglot, because this is about LSP use of > > > JSON, not about JSON in general. > > > > Not quite. This is about JSON, the data interchange format, being used > > to interchange buffers or snippets of emacs buffers. That's not an > > exclusive of LSP. Possibly (probably?) eer other jsonrpc.el applicaiton > > in the wild does something like that (dape the DAP client, the countless > > copilot/AI plugins). So I really don't think Eglot is the place to put > > this exception. > > > > > Can someone test what other LSP clients do in these situations? For > > > example, what does VSCode do with such source files? If it does > > > somehow allow using LPS for such source files, it would be interesting > > > to know what does its LSP client send to the server in those cases. > > > Then perhaps we could teach json.c do the same. > > > > Agree. Also look at NeoVim, seems closer to the Emacs ecosystem. > > > > > Well, AFAIU "not starting Eglot" is what happens already by default, > > > because of that error we raise. So if we decide to do that, it means > > > there's nothing to do here except document the restriction better. > > > > If the backtrace of the error which I missed can be reiterated here we > > could maybe make it a nicer message. > > > > > This would need someone who knows more about LSP servers than I do to > > > suggest a specific trick. Which is why I asked above what other LSP > > > clients do in such cases. > > > > > > In general, sending invalid sequences is a riskier solution, because > > > some servers might be unable to cope. For example, I'm guessing that > > > servers written in Python will flatly reject such sequences because > > > AFAIK Python cannot support them. > > > > LSP has decent error reporting support. Eglot/jsonrpc models it well > > IMO. I think the situation of a server rejecting an LSP document would > > be much cleaner. > > > > João > > > > > >
bug-gnu-emacs@HIDDEN:bug#79682; Package emacs.
Full text available.
Received: (at 79682) by debbugs.gnu.org; 9 Nov 2025 21:54:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 09 16:54:18 2025
Received: from localhost ([127.0.0.1]:33191 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1vIDMX-0007Q1-NM
for submit <at> debbugs.gnu.org; Sun, 09 Nov 2025 16:54:18 -0500
Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:40705)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
(Exim 4.84_2) (envelope-from <p.stephani2@HIDDEN>)
id 1vIDMU-0007Pp-Uy
for 79682 <at> debbugs.gnu.org; Sun, 09 Nov 2025 16:54:15 -0500
Received: by mail-wr1-x429.google.com with SMTP id
ffacd0b85a97d-429c5e0f94eso143135f8f.3
for <79682 <at> debbugs.gnu.org>; Sun, 09 Nov 2025 13:54:14 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1762725249; x=1763330049; darn=debbugs.gnu.org;
h=to:references:message-id:content-transfer-encoding:cc:date
:in-reply-to:from:subject:mime-version:from:to:cc:subject:date
:message-id:reply-to;
bh=Db6mD5x0AGccYDDiZdIU74IggC2Jumc3SbDv/pVbxaE=;
b=WWx+js6hnBMJ0AnExHSk+Re83IbrGn3UXV9ns6302RdTtnf0yfO93evToLMEtojWxF
brQfB3bX4qPtwsQwOtxHnVe2s4o1ArQGku3KZEj2ass2kxzy8dl0pN4OvBNPSZTdJOjE
UuDt5vrl+B7lUBj70KP4ZrwWE7E/uyCus9c5FVlJId3Ot0nSRJ3yNOCiz6vbsc46uS2M
sNqjLxbNJBTDfb77dE4usNeoIbiZVpVPnS4XSW0nNNnwPiaSZbJP9XItfKnf7NHIYm65
vvLWj4p37QfM9DAZEqDg3MsTVpt791bj5xfcucvrX67M3FKhBzJ7X6IXS1/QRpmQQ6l4
Hj9w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1762725249; x=1763330049;
h=to:references:message-id:content-transfer-encoding:cc:date
:in-reply-to:from:subject:mime-version:x-gm-gg:x-gm-message-state
:from:to:cc:subject:date:message-id:reply-to;
bh=Db6mD5x0AGccYDDiZdIU74IggC2Jumc3SbDv/pVbxaE=;
b=wzdWdMHxpr747SM3uxlYPg8+bu8MT5MFrlu6aFYsbvFQGdNVY/vzBBy3OgQNZKKdcc
A54dvqc+UqFz4alCZ8qceuRXYosupv4L65Jvu/UkZA1kVP0sADIhLmVrsbQ1tT71pJ7T
4Tl1t2fovG0YrfhSInrAgFL9uVFjs3VC1EanZlAEQwkrwqWbki73LY4NTCLi84hYrWZp
hzBIVVVV3o9FRY4pNJwf7KdbojWhtR9LjRFKJLLZKuUMw9mve9h1MFk1LvXBrkcCAjyu
fNlfJoTsW25gY8VNuC4WgYyKiPTHDzwmFb4JIc7FYdtDpkvRewHlDwcPSyzk9GbODkkd
aTLg==
X-Forwarded-Encrypted: i=1;
AJvYcCWJOW6ScPt3wo9EotCDtaXYXwxJQ+qgnatRc6DPlsk1ICQkkzGZOTbfutCMqLVyxzixSYwJMw==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YyYxQTAQBsj9LrJwfe8QrLUUqVtq2soKwJdKwtmjReLW5XM8lwQ
GPGSL8lWZmIen5L31IS7mDYYyqjCUuKySbJCAmK9BKvyBq8GT8DiszVPGNdSeA==
X-Gm-Gg: ASbGncvG70cn5nTYweT39ht47RVJd7SJxRrtcR1QDd/aGUe3OdU4x/7GqhpvzNBcp6R
MqvP3yMqeFb5kxxxgjpjA690LjbuK1BLvI+JMOQ8rtQaww5z5Xs3K6vV26mcS460RNxPOVXBCjh
4x37PBVtTfEYY/wV3j17sNTHHDdDEoooAX1CoUxX421sb9bh86Oqub87lNr3T8gA4eNyQRZYtWf
WpE4vkzO//BahGBy/8zBjpHDF2vQilihVjzFyEreRR2mYJjvlhgR71KRLfTqcnIh9XfY8HX2jQP
DdW6t/uIAp1yMVqU9eWmVHxZTpRZa9f0EoJ2rXJmhNfoLYoTr8ASEckIPNRf536hN6SCLUZ72Wd
Wwj2NNaXIGDLdsjIXtso2EfOlxGe0uV8cG2xcoXFBUqacEURdjix0UPe6RkpeOB7iXclDSsI7ss
Ljm8mKG+rQSTLmiwKAaWIQhlPPdKWmHrFPwQ==
X-Google-Smtp-Source: AGHT+IGbzdytLLkuvI5KUN/BkSEdz2Q9wnSd4g3Vudc7yXUZDaDoixO89RobO5TcTIFKm31S7zbMWw==
X-Received: by 2002:a05:600c:4ecf:b0:477:7a95:b96b with SMTP id
5b1f17b1804b1-4777a95bbe9mr11267835e9.1.1762725248656;
Sun, 09 Nov 2025 13:54:08 -0800 (PST)
Received: from smtpclient.apple ([2001:a61:3a9a:e01:cde6:56a4:7b37:b652])
by smtp.gmail.com with ESMTPSA id
5b1f17b1804b1-47763e15481sm93398265e9.3.2025.11.09.13.54.07
(version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
Sun, 09 Nov 2025 13:54:08 -0800 (PST)
Content-Type: text/plain;
charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.200.81.1.6\))
Subject: Re: bug#79682: 31.0.50; Eglot does not support buffers containing
special characters.
From: Philipp Stephani <p.stephani2@HIDDEN>
In-Reply-To: <86qzu87pua.fsf@HIDDEN>
Date: Sun, 9 Nov 2025 22:53:57 +0100
Content-Transfer-Encoding: quoted-printable
Message-Id: <83E4399E-0027-4B34-8605-5CCB2051D0D6@HIDDEN>
References: <87frba6rhn.fsf@HIDDEN> <86347auii0.fsf@HIDDEN>
<CALDnm51Qm73we9AFQKWLwbLFPmLOZ4AqFMQb8Y=f72LGSDjK7Q@HIDDEN>
<86ms5gu889.fsf@HIDDEN> <875xc45jl4.fsf@HIDDEN> <86qzursbmd.fsf@HIDDEN>
<87v7k23vky.fsf@HIDDEN> <86qzu87pua.fsf@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
X-Mailer: Apple Mail (2.3864.200.81.1.6)
X-Spam-Score: 1.3 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
has NOT identified this incoming email as spam. The original
message has been attached to this so you can view it or label
similar future email. If you have any questions, see
the administrator of that system for details.
Content preview: > Am 08.11.2025 um 11:58 schrieb Eli Zaretskii : > > Ping!
Can someone please look and tell how other LSP clients handle > these
situations?
> > Philipp, can you tell why we insist on rejecting inval [...]
Content analysis details: (1.3 points, 10.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record
0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
provider (p.stephani2[at]gmail.com)
-0.0 SPF_PASS SPF: sender matches SPF record
0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends
in digit (p.stephani2[at]gmail.com)
-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/,
no trust [2a00:1450:4864:20:0:0:0:429 listed in]
[list.dnswl.org]
1.0 FREEMAIL_REPLY From and body contain different freemails
X-Debbugs-Envelope-To: 79682
Cc: isouthrain@HIDDEN,
=?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= <joaotavora@HIDDEN>, 79682 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)
> Am 08.11.2025 um 11:58 schrieb Eli Zaretskii <eliz@HIDDEN>:
>=20
> Ping! Can someone please look and tell how other LSP clients handle
> these situations?
>=20
> Philipp, can you tell why we insist on rejecting invalid Unicode
> characters instead of replacing them, even as an option?
See the reasoning given for starting to reject invalid codepoints in the =
Go JSON API (https://go.dev/blog/jsonv2-exp#behavior-flaws):
=E2=80=A2 encoding/json currently accepts invalid UTF-8, whereas the =
latest Internet Standard (RFC 8259) requires valid UTF-8. The default =
behavior should report an error in the presence of invalid UTF-8, =
instead of introducing silent data corruption, which may cause problems =
downstream.
So rejecting invalid codepoints/UTF-8 code unit sequences should remain =
the default (as well as rejecting duplicate keys, both for serialization =
and deserialization).
If there's a strong and demonstrated need for specific protocols to =
allow for invalid Unicode input, it would be possible to introduce a =
serialization option (as another keyword argument to json-serialize) =
similar to AllowInvalidUTF8 in Go =
(https://pkg.go.dev/encoding/json/jsontext#AllowInvalidUTF8), but it =
should remain off by default.
>=20
>> From: Jo=C3=A3o T=C3=A1vora <joaotavora@HIDDEN>
>> Cc: Philipp Stephani <p.stephani2@HIDDEN>, isouthrain@HIDDEN,
>> 79682 <at> debbugs.gnu.org
>> Date: Sun, 26 Oct 2025 08:39:57 +0000
>>=20
>> Eli Zaretskii <eliz@HIDDEN> writes:
>>=20
>>> Maybe. At the time, the people who worked on json.c (Philipp, =
AFAIR)
>>> were very adamant that we should flatly reject non-Unicode =
characters.
>>=20
>> Now you mention, I do remember much adamance, but I never got the =
point.
>>=20
>>> I suggested to do this in Eglot, because this is about LSP use of
>>> JSON, not about JSON in general.
>>=20
>> Not quite. This is about JSON, the data interchange format, being =
used
>> to interchange buffers or snippets of emacs buffers. That's not an
>> exclusive of LSP. Possibly (probably?) eer other jsonrpc.el =
applicaiton
>> in the wild does something like that (dape the DAP client, the =
countless
>> copilot/AI plugins). So I really don't think Eglot is the place to =
put
>> this exception.
>>=20
>>> Can someone test what other LSP clients do in these situations? For
>>> example, what does VSCode do with such source files? If it does
>>> somehow allow using LPS for such source files, it would be =
interesting
>>> to know what does its LSP client send to the server in those cases.
>>> Then perhaps we could teach json.c do the same.
>>=20
>> Agree. Also look at NeoVim, seems closer to the Emacs ecosystem.
>>=20
>>> Well, AFAIU "not starting Eglot" is what happens already by default,
>>> because of that error we raise. So if we decide to do that, it =
means
>>> there's nothing to do here except document the restriction better.
>>=20
>> If the backtrace of the error which I missed can be reiterated here =
we
>> could maybe make it a nicer message.
>>=20
>>> This would need someone who knows more about LSP servers than I do =
to
>>> suggest a specific trick. Which is why I asked above what other LSP
>>> clients do in such cases.
>>>=20
>>> In general, sending invalid sequences is a riskier solution, because
>>> some servers might be unable to cope. For example, I'm guessing =
that
>>> servers written in Python will flatly reject such sequences because
>>> AFAIK Python cannot support them.
>>=20
>> LSP has decent error reporting support. Eglot/jsonrpc models it well
>> IMO. I think the situation of a server rejecting an LSP document =
would
>> be much cleaner.
>>=20
>> Jo=C3=A3o
>>=20
bug-gnu-emacs@HIDDEN:bug#79682; Package emacs.
Full text available.Received: (at 79682) by debbugs.gnu.org; 8 Nov 2025 10:59:04 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 08 05:59:04 2025 Received: from localhost ([127.0.0.1]:51012 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vHget-0002bv-Is for submit <at> debbugs.gnu.org; Sat, 08 Nov 2025 05:59:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41056) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1vHges-0002bU-Eh for 79682 <at> debbugs.gnu.org; Sat, 08 Nov 2025 05:59:02 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1vHgen-0002qv-6H; Sat, 08 Nov 2025 05:58:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=bJ3S5vf1JfNqIkxW9LWMsBghzm99DkjD+kkkRuc57UE=; b=p6CEwbAphGARXoPjpttn nr3QgEr0HlmIYJe4mXDa3I0BPOT92I9kVDVpXJ0Xz6AbeNoR7GrZ+up2IFyQV47wHbYyjeaGyOqi0 ZlMuDybJR4tz2ymhylBoaBx82ATpsUk/34kBdmp4cJ1Kg1ODm0gSRqoshsaiW8MVImQECKxgbwwPZ xqrMMg9/b2namxEgBUrU1L6J5in29xxYpQJyoo/Roipf8I8eY1NlfVFiPQwmDSTmzNFIN8OprXlvP 6CqF7WAe5KwBhFU1ihOdj9DvNKh5RBHDOJ6/GuECQS7w7UI3ODK/rSIykf2/WED/Apn6FI2gzr3Br UdGdwsTcTDMlgw==; Date: Sat, 08 Nov 2025 12:58:53 +0200 Message-Id: <86qzu87pua.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: p.stephani2@HIDDEN, =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= <joaotavora@HIDDEN> In-Reply-To: <87v7k23vky.fsf@HIDDEN> (message from =?utf-8?B?Sm/Do28g?= =?utf-8?B?VMOhdm9yYQ==?= on Sun, 26 Oct 2025 08:39:57 +0000) Subject: Re: bug#79682: 31.0.50; Eglot does not support buffers containing special characters. References: <87frba6rhn.fsf@HIDDEN> <86347auii0.fsf@HIDDEN> <CALDnm51Qm73we9AFQKWLwbLFPmLOZ4AqFMQb8Y=f72LGSDjK7Q@HIDDEN> <86ms5gu889.fsf@HIDDEN> <875xc45jl4.fsf@HIDDEN> <86qzursbmd.fsf@HIDDEN> <87v7k23vky.fsf@HIDDEN> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79682 Cc: isouthrain@HIDDEN, 79682 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Ping! Can someone please look and tell how other LSP clients handle these situations? Philipp, can you tell why we insist on rejecting invalid Unicode characters instead of replacing them, even as an option? > From: João Távora <joaotavora@HIDDEN> > Cc: Philipp Stephani <p.stephani2@HIDDEN>, isouthrain@HIDDEN, > 79682 <at> debbugs.gnu.org > Date: Sun, 26 Oct 2025 08:39:57 +0000 > > Eli Zaretskii <eliz@HIDDEN> writes: > > > Maybe. At the time, the people who worked on json.c (Philipp, AFAIR) > > were very adamant that we should flatly reject non-Unicode characters. > > Now you mention, I do remember much adamance, but I never got the point. > > > I suggested to do this in Eglot, because this is about LSP use of > > JSON, not about JSON in general. > > Not quite. This is about JSON, the data interchange format, being used > to interchange buffers or snippets of emacs buffers. That's not an > exclusive of LSP. Possibly (probably?) eer other jsonrpc.el applicaiton > in the wild does something like that (dape the DAP client, the countless > copilot/AI plugins). So I really don't think Eglot is the place to put > this exception. > > > Can someone test what other LSP clients do in these situations? For > > example, what does VSCode do with such source files? If it does > > somehow allow using LPS for such source files, it would be interesting > > to know what does its LSP client send to the server in those cases. > > Then perhaps we could teach json.c do the same. > > Agree. Also look at NeoVim, seems closer to the Emacs ecosystem. > > > Well, AFAIU "not starting Eglot" is what happens already by default, > > because of that error we raise. So if we decide to do that, it means > > there's nothing to do here except document the restriction better. > > If the backtrace of the error which I missed can be reiterated here we > could maybe make it a nicer message. > > > This would need someone who knows more about LSP servers than I do to > > suggest a specific trick. Which is why I asked above what other LSP > > clients do in such cases. > > > > In general, sending invalid sequences is a riskier solution, because > > some servers might be unable to cope. For example, I'm guessing that > > servers written in Python will flatly reject such sequences because > > AFAIK Python cannot support them. > > LSP has decent error reporting support. Eglot/jsonrpc models it well > IMO. I think the situation of a server rejecting an LSP document would > be much cleaner. > > João >
bug-gnu-emacs@HIDDEN:bug#79682; Package emacs.
Full text available.Received: (at 79682) by debbugs.gnu.org; 26 Oct 2025 08:38:41 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 26 04:38:41 2025 Received: from localhost ([127.0.0.1]:44000 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vCwGu-00005Z-U5 for submit <at> debbugs.gnu.org; Sun, 26 Oct 2025 04:38:41 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:43197) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <joaotavora@HIDDEN>) id 1vCwGs-00005J-HJ for 79682 <at> debbugs.gnu.org; Sun, 26 Oct 2025 04:38:39 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-475c9881821so22431135e9.0 for <79682 <at> debbugs.gnu.org>; Sun, 26 Oct 2025 01:38:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761467912; x=1762072712; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=E4jmBXj1HmA8vCzEHhUHFu+5NUcP9lHVAuCbz4KxCgs=; b=GuTFG02mvUM86EtcmNwaQ0S7Hakm1h5mr7NDiahzX5o5RnP4fpo3rObIMoydH1eo1C WP+Li61WygpQeRBrIzhmeG74Ktb93OhIJYogAYE6+T47se/TBORDuccn1D7j77QmPxuc we20uEKbWp0JO/XuqDugwd0VJx5gV3kWThFKDjTGu6h+TsXFztE17tmvOAkR9FVZAIC8 rB5PLMLBcLdz/u4jVAl2cxhX/7OLShswRKJ9tJtAd9AQ8i/uBEz0rzZj7umDIZG9/cvS +t6hr17/x82KPaJanHdy6mr++/CBlebhMcq/JmGpNDD66ti6KtIsJ42DcPrMK47i3iyp 6n2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761467912; x=1762072712; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=E4jmBXj1HmA8vCzEHhUHFu+5NUcP9lHVAuCbz4KxCgs=; b=onPDSP/oJ7NqwoBaUtJVxCBYUbVchIRQFS9+g7ANhBjWI47GEcb1uZR9MV6iV7tMgN t81K3zsf6rTLyIgusUD899aXkB2cYS0mwZ8C8+biTuN/T7XgtqAqnKa/Hm9pNcH1fYQ6 R9Vs0Uih+vrME0chDBgPLt+M3cyiqkHiAuK2nBL25FenKGlkRGnnArG8LxjOJkXjihpy QC9b+bFcNbArFRXfIoewoo8pRjU4oBeji1l/I33pmeqKaH1IF460Gxi+r4DCCQmrzQFD cZLdBMm8Xr328jQAzLrlD9lWXaTFQ2sip1axwU0Lt1q/Db3Q1gEDENcLwmMN22viL8f3 WI7w== X-Forwarded-Encrypted: i=1; AJvYcCWJzvDQXYv50fWGf6BScnaQL5oOk78WjdEXTXNi6cHUXzIMmDqTKjmf/h9O31l4ODvJu+vWTw==@debbugs.gnu.org X-Gm-Message-State: AOJu0YyhJQ3MgAnW1ipxlYKZgjSvv8sOPOerYcwdkyKbOfETMW0QJzGE hMulx3X7s7PtRdZUwpCMEyDjmKtQZJY61Xt2iUkxXCru5RBQ1tDpCV8wra0ZVQ== X-Gm-Gg: ASbGnctXHTjqEV5elcPXU1OlVzEi6TAj3wfGlQxy+iq75Bl18omuWrDSwDW2JVWj2UO m4TcXauTipzxJxzbyKbqWO4HHIxH/AsG8h+LcdOjKlL6iB+u28kk6KBMhW1iB0j/GUCnb+IAwx5 85OL/2vj3I5B2OpR5pW5uOjFxxYsSxoYAiA3kcDBlH3sm0WEKJYPzmaDKHlPJpu/hHGoej5XH4w PCgUtueT4Vxskv5TP10LZrqIuIpOFujiY2DoM7Vq0gjplXX0S+kydijtT8IfblXQsQPDwCDXUEU CAVVaaU9amDYpH8bMAQkDnJE0+4qIo+9s1JI0FdoNfq6DMU8EgZpAEl5qd/Xbqbfa9qfXOp6OSy jVV/426qRrCIXgrYNkVqtT0JxDER5F5yJvOcbVNmLKt1VNy2C9/tPC7yHoilonJZbNwsG/AFxbd cM274y/hYJKxB0PQ8xRg== X-Google-Smtp-Source: AGHT+IEjf9x4LzHjkuLJpR5/EEE+O6+8aGQePC7gyMZ9H+reV36YINTIJWb8dYwq9gphYMVIwJFLzg== X-Received: by 2002:a05:600d:4382:b0:45d:dbf0:4831 with SMTP id 5b1f17b1804b1-475d22973d5mr42693825e9.0.1761467911501; Sun, 26 Oct 2025 01:38:31 -0700 (PDT) Received: from krug (87-196-72-166.net.novis.pt. [87.196.72.166]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429952df62dsm8029645f8f.45.2025.10.26.01.38.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Oct 2025 01:38:31 -0700 (PDT) From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= <joaotavora@HIDDEN> To: Eli Zaretskii <eliz@HIDDEN> Subject: Re: bug#79682: 31.0.50; Eglot does not support buffers containing special characters. In-Reply-To: <86qzursbmd.fsf@HIDDEN> References: <87frba6rhn.fsf@HIDDEN> <86347auii0.fsf@HIDDEN> <CALDnm51Qm73we9AFQKWLwbLFPmLOZ4AqFMQb8Y=f72LGSDjK7Q@HIDDEN> <86ms5gu889.fsf@HIDDEN> <875xc45jl4.fsf@HIDDEN> <86qzursbmd.fsf@HIDDEN> Date: Sun, 26 Oct 2025 08:39:57 +0000 Message-ID: <87v7k23vky.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 79682 Cc: isouthrain@HIDDEN, Philipp Stephani <p.stephani2@HIDDEN>, 79682 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Eli Zaretskii <eliz@HIDDEN> writes: > Maybe. At the time, the people who worked on json.c (Philipp, AFAIR) > were very adamant that we should flatly reject non-Unicode characters. Now you mention, I do remember much adamance, but I never got the point. > I suggested to do this in Eglot, because this is about LSP use of > JSON, not about JSON in general. Not quite. This is about JSON, the data interchange format, being used to interchange buffers or snippets of emacs buffers. That's not an exclusive of LSP. Possibly (probably?) eer other jsonrpc.el applicaiton in the wild does something like that (dape the DAP client, the countless copilot/AI plugins). So I really don't think Eglot is the place to put this exception. > Can someone test what other LSP clients do in these situations? For > example, what does VSCode do with such source files? If it does > somehow allow using LPS for such source files, it would be interesting > to know what does its LSP client send to the server in those cases. > Then perhaps we could teach json.c do the same. Agree. Also look at NeoVim, seems closer to the Emacs ecosystem. > Well, AFAIU "not starting Eglot" is what happens already by default, > because of that error we raise. So if we decide to do that, it means > there's nothing to do here except document the restriction better. If the backtrace of the error which I missed can be reiterated here we could maybe make it a nicer message. > This would need someone who knows more about LSP servers than I do to > suggest a specific trick. Which is why I asked above what other LSP > clients do in such cases. > > In general, sending invalid sequences is a riskier solution, because > some servers might be unable to cope. For example, I'm guessing that > servers written in Python will flatly reject such sequences because > AFAIK Python cannot support them. LSP has decent error reporting support. Eglot/jsonrpc models it well IMO. I think the situation of a server rejecting an LSP document would be much cleaner. Jo=C3=A3o
bug-gnu-emacs@HIDDEN:bug#79682; Package emacs.
Full text available.Received: (at 79682) by debbugs.gnu.org; 25 Oct 2025 09:56:29 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 25 05:56:29 2025 Received: from localhost ([127.0.0.1]:39978 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vCb0e-0000yy-PM for submit <at> debbugs.gnu.org; Sat, 25 Oct 2025 05:56:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38340) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1vCb0a-0000yZ-E5 for 79682 <at> debbugs.gnu.org; Sat, 25 Oct 2025 05:56:27 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1vCb0U-0006py-Os; Sat, 25 Oct 2025 05:56:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=solbZ7wgJJlBdfNugd+VxaJ4lLdSjCwS64qe1YyfqRA=; b=mx0GKwg4hFZH KYuGU651N47qFg1RZgAawbuLfHccqug0SJooRZHD/Fq+VcwlrMvjBeSG/eK1Ex+KaS5YXJFle1Q64 eUuhKWBjfL5nUaXaF7xNHveHYzUXQYvrTXvkEG3pHTqpm4D7vNEYL8XXJTbWReq7IAhV7Xhig4whM CjJZ684vg9e/a4/LQqT8CsMMeb8jIi8ozjVO3cxqjO7zCcI7sNwwhoPINbrNrnVxKLTl6jd7g++5w 1FXEb6SeaqNkgcsEZQE/44OHwhA9OrmD+HQ54fOfX31mv2ZgEESaDMjE211iqNCI8/t4EnzSRk7O/ ky7AggT4QvfNT3XdnKzuBA==; Date: Sat, 25 Oct 2025 12:56:16 +0300 Message-Id: <86ecqrs3sv.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: ISouthRain <isouthrain@HIDDEN> In-Reply-To: <86cy6bzjao.fsf@HIDDEN> (message from ISouthRain on Sat, 25 Oct 2025 12:39:43 +0800) Subject: Re: bug#79682: 31.0.50; Eglot does not support buffers containing special characters. References: <87frba6rhn.fsf@HIDDEN> <86347auii0.fsf@HIDDEN> <CALDnm51Qm73we9AFQKWLwbLFPmLOZ4AqFMQb8Y=f72LGSDjK7Q@HIDDEN> <86ms5gu889.fsf@HIDDEN> <875xc45jl4.fsf@HIDDEN> <86cy6bzjao.fsf@HIDDEN> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79682 Cc: joaotavora@HIDDEN, 79682 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > From: ISouthRain <isouthrain@HIDDEN> > Cc: Eli Zaretskii <eliz@HIDDEN>, 79682 <at> debbugs.gnu.org > Date: Sat, 25 Oct 2025 12:39:43 +0800 > > However, it makes sense to launch LSP even with an "erroneous character," even if that character is meaningless. > > If I have a very large .c file with a lot of content, it would be frustrating if I couldn't use eglot properly just because of this "erroneous character." Can you see what other IDEs that support LSP do in these cases? If they have some way of working around the problem, we can try doing the same. E.g., what does VSCode do if you open such a .C file and invoke some command that needs to send the source to an LSP server? > Because I have to delete this "erroneous character" to start eglot normally, but I don't know where this "erroneous character" is, or what it looks like, so I can't find it and delete it... Finding them is easy, like so: M-: (skip-chars-forward "\x000-\x10ffff") RET It will stop at the first problematic character. Keep doing this until you get to end of buffer. You can also replace them using C-M-%.
bug-gnu-emacs@HIDDEN:bug#79682; Package emacs.
Full text available.Received: (at 79682) by debbugs.gnu.org; 25 Oct 2025 07:28:20 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 25 03:28:20 2025 Received: from localhost ([127.0.0.1]:39718 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vCYhH-0000IU-Ll for submit <at> debbugs.gnu.org; Sat, 25 Oct 2025 03:28:20 -0400 Received: from mail-ot1-x335.google.com ([2607:f8b0:4864:20::335]:60458) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <joaotavora@HIDDEN>) id 1vCYhE-0000I2-L2 for 79682 <at> debbugs.gnu.org; Sat, 25 Oct 2025 03:28:17 -0400 Received: by mail-ot1-x335.google.com with SMTP id 46e09a7af769-7c28c21aba1so2177871a34.0 for <79682 <at> debbugs.gnu.org>; Sat, 25 Oct 2025 00:28:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761377290; x=1761982090; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=uieuSDO1PhqcPDDnNo4+lSVu73b/OBefisjSg4vGp6Q=; b=S1p15oBTLOiQwmTzuuJprdHGvX0CY8FJaFenjSx6veI1mPdvWfRCfvlruBEXEPn28X OmgBf0p9j2WK75/jAKq38TQ/0euexqeq3r2Hy+FMo5aLag6Scz+VLTguO/aVPjh0t49E YQBHcEBMaYALEYmFve7q++o0w5PHZr0MurF2Qt5Xe/K4iPUTGc1PpdzI8enJhjhoTXBY mYDCo2F72ZKQrPdpSoFB7KvPwnjLTco33I8sXR5/bsCNcTnmfd0NFdkHakAjtyANKHNS HFnOaUUG5JwikEG30vwmrxK8DSuF1BGY9GOL9AmKwMVoQ9+NSfPDj1Mgu4aVGaHuVsiu uvkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761377290; x=1761982090; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=uieuSDO1PhqcPDDnNo4+lSVu73b/OBefisjSg4vGp6Q=; b=NogzIWRW+QCNod+9it3iMq9TSu2HTB3DXVBrFNqNYI6SbZ7nK05aTQnBuAJ30Ryz10 Ovs1rK+CWP+eBk8QFexCJLK25PwMiX/sRf5wWA+N/hhQVljTHW1iaLqU43WRe0KhpUlw EC8TTmh7EcXtAsOlM4MIASYuJx8Dzy1HD2XFTgAay6BRmi3bPVxMm21F2+6yWYfd94+4 AxdyefUsTRAfG3X8D6ltVNHcMMXtVBehLCQixEmFKZc4u3rub32nsovj4UjZzBi1Iei0 7pEwJujv97Qc1eweiUN9wb3Q0tV3inuRBsggn+9SKjTLKmxfKd2lKP8r0dlANC/shm/a lGDg== X-Forwarded-Encrypted: i=1; AJvYcCUFAKvjAL5/5OG/DyZ5cs9fMwulxhZnXd/KyIkS+fSSvWpfuoWgOg7t3OTaYbZHtNJIuHe/rQ==@debbugs.gnu.org X-Gm-Message-State: AOJu0YzfzJFOKkd/aZjsoizDwZRunufQpCiIIKFTW6i/PNVpKacbMxCF Uwu9Ygqtr7I+QGCb9NdJoJ4D4Q7xGBa1W4w3Mq4FaI+1CJXlSuVY6XfDDIuVEXEG49b7PrPUI8t 0q1r4ifuKG87WVT+DEQv0tLgsafEGw2k= X-Gm-Gg: ASbGnctviLSbLwUoq0K4odK35rj2ncvplsuc596YDIbsCJvC+MMstuhNH4WRuHQASiC b6gpyeOfPSTixgJPw5w11jqVueIAY8V55IIKuF0zXTo75MAJnBcktF3wAiHg9ajjH+tpMyLJjfU SbhCAx0WzX4ojIMw/2TOdWcLKTTFxyOOmIIG2aDTdM7511M4Q7DGXyKEhIfgeJuKfM3EAWrV17a wH9SBb6C5cfXfiQ1LX1To3jOLFMX1a6fO9+Ts1kuWmcSzsg889pcIruF7SO X-Google-Smtp-Source: AGHT+IGlJZCcYkr7jbPzCwkxK8b49agowpVPwMW5MSqvT0slgpc81Jb4kwyHp+JAxkEYDqw2fVuXF6pBOriti7rH2cQ= X-Received: by 2002:a05:6808:2229:b0:442:6757:187b with SMTP id 5614622812f47-443a2ec72a3mr12604256b6e.4.1761377290304; Sat, 25 Oct 2025 00:28:10 -0700 (PDT) MIME-Version: 1.0 References: <87frba6rhn.fsf@HIDDEN> <86347auii0.fsf@HIDDEN> <CALDnm51Qm73we9AFQKWLwbLFPmLOZ4AqFMQb8Y=f72LGSDjK7Q@HIDDEN> <86ms5gu889.fsf@HIDDEN> <875xc45jl4.fsf@HIDDEN> <86cy6bzjao.fsf@HIDDEN> In-Reply-To: <86cy6bzjao.fsf@HIDDEN> From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= <joaotavora@HIDDEN> Date: Sat, 25 Oct 2025 08:28:00 +0100 X-Gm-Features: AWmQ_bnlEJqaJhJRaJQlPsGVzLz9JfJ164l_Cvjq3amEkUUHHyLcK7X6_DaP2O8 Message-ID: <CALDnm5054igBgC2mC07RXJ+w3mbhAHbvbsmYgLD4vqEf1co++g@HIDDEN> Subject: Re: bug#79682: 31.0.50; Eglot does not support buffers containing special characters. To: ISouthRain <isouthrain@HIDDEN> Content-Type: multipart/alternative; boundary="000000000000b442c90641f69ba2" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 79682 Cc: Eli Zaretskii <eliz@HIDDEN>, 79682 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --000000000000b442c90641f69ba2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > > On Sat, Oct 25, 2025, 05:39 ISouthRain <isouthrain@HIDDEN> wrote: Because I have to delete this "erroneous character" to start eglot > normally, but I don't know where this "erroneous character" is, or what i= t > looks like, so I can't find it and delete it... I'm moderately sure Emacs has facilities for sanitizing buffers, i.e. finding and replacing codepoints outside certain encoding ranges in the whole buffer. I myself use this from time to time, but I'm not an expert. Eli can help here. Jo=C3=A3o --000000000000b442c90641f69ba2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"auto"><div><div class=3D"gmail_quote gmail_quote_container"><bl= ockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-lef= t:1px solid rgb(204,204,204);padding-left:1ex"></blockquote></div></div><di= v dir=3D"auto">On Sat, Oct 25, 2025, 05:39 ISouthRain <<a href=3D"mailto= :isouthrain@HIDDEN">isouthrain@HIDDEN</a>> wrote:</div><div dir=3D= "auto"><br></div><div dir=3D"auto"><div class=3D"gmail_quote gmail_quote_co= ntainer"><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8e= x;border-left:1px solid rgb(204,204,204);padding-left:1ex">Because I have t= o delete this "erroneous character" to start eglot normally, but = I don't know where this "erroneous character" is, or what it = looks like, so I can't find it and delete it...</blockquote></div></div= ><div dir=3D"auto"><br></div><div dir=3D"auto">I'm moderately sure Emac= s has facilities for sanitizing buffers, i.e. finding and replacing codepoi= nts=C2=A0 outside certain encoding ranges in the whole buffer. I myself use= this from time to time, but I'm not an expert. Eli can help here.=C2= =A0</div><div dir=3D"auto"><br></div><div dir=3D"auto">Jo=C3=A3o</div><div = dir=3D"auto"><br></div><div dir=3D"auto"></div><div dir=3D"auto"><br></div>= <div dir=3D"auto"></div></div> --000000000000b442c90641f69ba2--
bug-gnu-emacs@HIDDEN:bug#79682; Package emacs.
Full text available.Received: (at 79682) by debbugs.gnu.org; 25 Oct 2025 07:07:35 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 25 03:07:35 2025 Received: from localhost ([127.0.0.1]:39612 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vCYNC-0007IF-Aj for submit <at> debbugs.gnu.org; Sat, 25 Oct 2025 03:07:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41004) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1vCYN9-0007I0-Ln for 79682 <at> debbugs.gnu.org; Sat, 25 Oct 2025 03:07:32 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1vCYN4-00034w-9L; Sat, 25 Oct 2025 03:07:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=9aJms1sPtpFo9PyJW6LV1RYOX/G6taI94qAGuMshqLk=; b=jEnwkpIUurRKZ6+qoc7x YNpvEvf/vENPugIG6AV4FMcnRcgLkOgXQwxmy4bCWeVD9jPMZS366g0m0o+gkHbs68JvfWehzpQAX XSIDI4aapcVn9ciwEX9FzZQFu25pAm/2zxANiE2JgweTPArYo3/Y6S4VW7a3yFe1Q1ZVehwhLTKwh 2aOMtrY5nHBXpsFx44TvOwa2eoeCLXVsCz9kaNIUWhBtU5ahg95xRS82ejA/5hB/eMZM3egSmU50E xVDJsAuXXd83mhdx93Bm/La0T4anz2O93Pex3NRVmbPz1+LZO+CHiF2PYRNEr1ffvYzvmvI/FkmhB 9I1srdgs4stbBQ==; Date: Sat, 25 Oct 2025 10:07:22 +0300 Message-Id: <86qzursbmd.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= <joaotavora@HIDDEN>, Philipp Stephani <p.stephani2@HIDDEN> In-Reply-To: <875xc45jl4.fsf@HIDDEN> (message from =?utf-8?B?Sm/Do28g?= =?utf-8?B?VMOhdm9yYQ==?= on Fri, 24 Oct 2025 17:51:35 +0100) Subject: Re: bug#79682: 31.0.50; Eglot does not support buffers containing special characters. References: <87frba6rhn.fsf@HIDDEN> <86347auii0.fsf@HIDDEN> <CALDnm51Qm73we9AFQKWLwbLFPmLOZ4AqFMQb8Y=f72LGSDjK7Q@HIDDEN> <86ms5gu889.fsf@HIDDEN> <875xc45jl4.fsf@HIDDEN> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79682 Cc: isouthrain@HIDDEN, 79682 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > From: João Távora <joaotavora@HIDDEN> > Cc: isouthrain@HIDDEN, 79682 <at> debbugs.gnu.org > Date: Fri, 24 Oct 2025 17:51:35 +0100 > > > Perhaps we could replace such characters with a string "?", for > > example, when we send the program text to the server? > > Not sure that wouldn't do more harm than good. It's proving the server > with an wrong picture of the file. A checksum of it would be wrong, for > example. (some servers actually have access to the file on disk and to > the representation we make of the file.) > > Also, if you remember vaguely, LSP counts columns in octets or code > points or something like that. So if we send just one byte, it could > mess up the conting. Maybe, but only if Emacs considers the original character to take more than one column. So to countermand that, we could send a string of one or 2 "?", depending on what (char-width CHARACTER) returns for the offending CHARACTER. In this case, the 0x161992 character is considered by Emacs to take 1 column, so a single "?" should be okay in this regard. But see below. > Even though realistically your idea probably would work, it's a very big > hack. Also why not do this hack in json.c?? That's where the > limitation is (well, that's were we're closest to the source of the > limitation, since the limitation is in JSON itself, according to you.) > It's very akward to sanitize this output in Eglot. Maybe. At the time, the people who worked on json.c (Philipp, AFAIR) were very adamant that we should flatly reject non-Unicode characters. I suggested to do this in Eglot, because this is about LSP use of JSON, not about JSON in general. So what the LSP servers do and allow is also an important factor, unlike with JSON in general. But perhaps we could make this behavior optional in json.c, subject to some variable exposed to Lisp that Eglot could set? Philipp, any comments or ideas? Can someone test what other LSP clients do in these situations? For example, what does VSCode do with such source files? If it does somehow allow using LPS for such source files, it would be interesting to know what does its LSP client send to the server in those cases. Then perhaps we could teach json.c do the same. > > If that is also impossible (i.e. will break some interaction with the > > server), then I would suggest that Eglot catches json-value-p errors > > and produces a more user-friendly error message, like > > > > Buffer text includes characters outside of Unicode codespace > > This makes more sense (sorry ISouthRain). But to confidently mention > "buffer text" in that error we'd want to surround only some > eglot--request/eglot--notify calls, which is awkward and confusing. I'd > say it doesn't even make sense to start Eglot in such a buffer, so the > check can happen much much earlier on, maybe in eglot--managed-mode. > But even this could be tricky to do because this mode is started > automaticaly in many situations. Well, AFAIU "not starting Eglot" is what happens already by default, because of that error we raise. So if we decide to do that, it means there's nothing to do here except document the restriction better. > > Does this make sense? > > Yes, I think it's starting to make sense now. Here's another option: > can't we play outside the JSON rules and send some "illegal" byte > sequences in json.c? Maybe some servers will grok this. At least I > think this should be attempted and the results collected for some > servers... I can test with 3 or 4 if you provide that json.c patch. This would need someone who knows more about LSP servers than I do to suggest a specific trick. Which is why I asked above what other LSP clients do in such cases. In general, sending invalid sequences is a riskier solution, because some servers might be unable to cope. For example, I'm guessing that servers written in Python will flatly reject such sequences because AFAIK Python cannot support them.
bug-gnu-emacs@HIDDEN:bug#79682; Package emacs.
Full text available.Received: (at 79682) by debbugs.gnu.org; 25 Oct 2025 04:40:07 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 25 00:40:06 2025 Received: from localhost ([127.0.0.1]:39363 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vCW4T-0006an-W7 for submit <at> debbugs.gnu.org; Sat, 25 Oct 2025 00:40:06 -0400 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]:59407) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <isouthrain@HIDDEN>) id 1vCW4M-0006ZX-QK for 79682 <at> debbugs.gnu.org; Sat, 25 Oct 2025 00:40:03 -0400 Received: by mail-pf1-x443.google.com with SMTP id d2e1a72fcca58-7810289cd4bso2750813b3a.2 for <79682 <at> debbugs.gnu.org>; Fri, 24 Oct 2025 21:39:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761367192; x=1761971992; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ygH/SRG3daNVRAPwkVBIjd4kSkvqWpNlnTbd9yr/+GQ=; b=cBhAfYlNXHSs+XE3yM33ezUhaoxFWE9ZkvOrK6HbKOo0V9k6c+iS59/yPRRWHFbbaj 6z9IDT4XQlHJ2ho69mUtz8fG9zDaQG24zzsezIuHP82hjw4QHM1f068+5swUfCSrTm6j DcoOcjtRf/wYEv7kS9Ob20YfPQmHbydfateyQg3+0An9vxUONQxm2epIfWxlAWuZyLhB YXNuWmCwk5MSIAV9B1SYz1ty3iLXvk24F/nN3OIsKd/FgFrvKjBWSzOi5KlS5Ot82ZPI 1HVRXRBYfO/fBbbvmU72bmOVwiQGFTHQNLEKd7KLdUXsOarySUnsOw7QOvxowVZT5LS3 CN2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761367192; x=1761971992; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ygH/SRG3daNVRAPwkVBIjd4kSkvqWpNlnTbd9yr/+GQ=; b=h3WzWPmuD0bzw1KzkpOeOxATLj2Xu5HU26YpKqk6c2xj5Rt7MyULjTIdqUMsOWuz2/ bO/4hVI4P9rkmRW56ltQhQ/1Tg9POvGz1vKBN0LNXJ/hzBJ5k6vL03ifBjwmSzq3Ttei ApIGqL+ScaQp/TOT8otsBKoL5S46yhpEr2ibfRHfL2d34DujtR0p4eQV5dE3YrI+P7/u MkG4k/pcjfJBb5/dvymVbEUJmXCOA2SGKVt7rblXqncpFze37SLB5qswuZiUZNTk1SPC vq5KpSlnKHuV8dd+DgLW3AnpBM0xJvBTNp1lqZ4sSW6SeEZMk6T3eV2+EM8z+Aq4Ysyd 9N6g== X-Forwarded-Encrypted: i=1; AJvYcCVhVULDOjkGW/P8YdtZVjmZKfENEOW1EQcfkQVw3bjqMwk7hBWMwyn7cxNTnejarN2f9qI5ZA==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yz+t1steakPhH0hp/J8/wHRErKV27tzNnNWKtBGwNWqJ2NDFxK+ VDJSsDsLIUhhIXY2PV5bkvvrHxOe+sYmO611JBMbKMyL1gTdUf9ifOubi4aF3YHB1F8= X-Gm-Gg: ASbGnctLlJgHNJHIJxoY9iqTf9pggYhyYagm2wwOlCT7YAKcOoIWXVdIUkePi461DHH 8AYCZnTzbkXZI4YdFk/kbnqdWyAu0d9TlmuTrN0kXw+COWKQMisfH00nvW8dBiAhUIojYiftgdJ n7jv0uLckWrcx3fEiC/1n9LAufvzd1w2ig/d5U3DcPQe58WJtTfSoKXYUfqgXMLrv50nvhBTb5M sj9tNugORLkzzU2890dUc2VmH3/4kr5MiPWPYdoIErC7fSCp5/Cq5N3qHhCZmmSbkuVQddGLpeN s++BK1XAo71LK99WWZC0KfdOPgGnFpT+I9Qke6yeYgo1InKCWgdRk5/MQdJDCosz2LG/NODGzhf iaiTj5ExDjfEUM2GySe1Ib3rqcx8d19IaN+sDdK7/zYpYnJBYezIdKZxneDERBdnLLQcOPzFtKg Br8exw+VLZa8ZX984XgA== X-Google-Smtp-Source: AGHT+IFlTZoE6NKwDWqw6lOJBuXD7g3lXT5PaRwVlvtizhEi/7PV2KiFNqe8mAZs64k8Vm2kwJ0oEg== X-Received: by 2002:a05:6a21:6d9f:b0:33b:bce3:31c2 with SMTP id adf61e73a8af0-33bbcf27bc1mr13914865637.20.1761367191806; Fri, 24 Oct 2025 21:39:51 -0700 (PDT) Received: from DESKTOP-BPKP3GV ([185.148.15.183]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b7127bf47a1sm822186a12.10.2025.10.24.21.39.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Oct 2025 21:39:51 -0700 (PDT) From: ISouthRain <isouthrain@HIDDEN> To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= <joaotavora@HIDDEN> Subject: Re: bug#79682: 31.0.50; Eglot does not support buffers containing special characters. In-Reply-To: <875xc45jl4.fsf@HIDDEN> References: <87frba6rhn.fsf@HIDDEN> <86347auii0.fsf@HIDDEN> <CALDnm51Qm73we9AFQKWLwbLFPmLOZ4AqFMQb8Y=f72LGSDjK7Q@HIDDEN> <86ms5gu889.fsf@HIDDEN> <875xc45jl4.fsf@HIDDEN> Date: Sat, 25 Oct 2025 12:39:43 +0800 Message-ID: <86cy6bzjao.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 79682 Cc: Eli Zaretskii <eliz@HIDDEN>, 79682 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Jo=C3=A3o T=C3=A1vora <joaotavora@HIDDEN> writes: > Eli Zaretskii <eliz@HIDDEN> writes: > >>> From: Jo=C3=A3o T=C3=A1vora <joaotavora@HIDDEN> >>> Date: Thu, 23 Oct 2025 16:43:25 +0100 >>> Cc: ISouthRain <isouthrain@HIDDEN>, 79682 <at> debbugs.gnu.org >>>=20 >>> On Thu, Oct 23, 2025, 09:31 Eli Zaretskii <eliz@HIDDEN> wrote: >>>=20 >>> That character (0x161992) is beyond the last character supported by >>> Unicode, which is 0x10ffff. I suspect that the LSP you are using >>> cannot cope with non-Unicode characters.=20=20 >>>=20 >>> If this is true, then it's a server problem. >> >> Sorry, I don't follow. The error which the OP quoted: >> >>> > And then message buffer out: >>> > ``` >>> > Error running timer: (wrong-type-argument json-value-p "// -*- >>coding: utf-8; -*- > > I must have missed this. I was commenting on your "I suspect the the > LSP you are using cannot cope", the "LSP" in question meaning "the > server" to me. > >> comes from Emacs. Specifically, it comes from json.c, when it tries >> to serialize the information to be sent to the LSP server as JSON >> object(s). JSON does not allow strings with characters outside of >> Unicode codespace, and the offending character, 0x161992, is such a >> character (Emacs supports character codepoints up to 0x3FFFFF). See >> json.c:json_out_string, where it calls string_not_unicode. The >> problematic character comes from the program source code in the >> buffer. So how can this be a server problem, when it happens entirely >> on our side? > > It's a problem of ours, you're right. I had misunderstood the problem. > But, if you're right in the "JSON does not allow...outside Unicode" > sentence, it's _also_ a problem of the server, in fact it's a problem of > the LSP protocol itself, since it is based on JSONRPC, which obviously > is based on JSON. > >>> Among the jobs of the LSP client, a particularly important one is to pr= ovide the server with an accurate >>> picture of the (saved on unsaved) document under the clients' control, = so that the server can reconstruct it >>> perfectly as if it had direct access to the disk. >> >> Perhaps we could replace such characters with a string "?", for >> example, when we send the program text to the server? > > Not sure that wouldn't do more harm than good. It's proving the server > with an wrong picture of the file. A checksum of it would be wrong, for > example. (some servers actually have access to the file on disk and to > the representation we make of the file.) > > Also, if you remember vaguely, LSP counts columns in octets or code > points or something like that. So if we send just one byte, it could > mess up the conting. > > Even though realistically your idea probably would work, it's a very big > hack. Also why not do this hack in json.c?? That's where the > limitation is (well, that's were we're closest to the source of the > limitation, since the limitation is in JSON itself, according to you.) > It's very akward to sanitize this output in Eglot. > >> If that is also impossible (i.e. will break some interaction with the >> server), then I would suggest that Eglot catches json-value-p errors >> and produces a more user-friendly error message, like >> >> Buffer text includes characters outside of Unicode codespace > > This makes more sense (sorry ISouthRain). But to confidently mention > "buffer text" in that error we'd want to surround only some > eglot--request/eglot--notify calls, which is awkward and confusing. I'd > say it doesn't even make sense to start Eglot in such a buffer, so the > check can happen much much earlier on, maybe in eglot--managed-mode. > But even this could be tricky to do because this mode is started > automaticaly in many situations. The issues you're discussing are beyond my understanding, so please excuse = my inability to help. However, it makes sense to launch LSP even with an "erroneous character," e= ven if that character is meaningless. If I have a very large .c file with a lot of content, it would be frustrati= ng if I couldn't use eglot properly just because of this "erroneous charact= er." Because I have to delete this "erroneous character" to start eglot normally= , but I don't know where this "erroneous character" is, or what it looks li= ke, so I can't find it and delete it... There is no clear source for how the "erroneous character" is produced. I o= nly know that the "erroneous character" comes from editing the file with "o= ther editors." > >> Does this make sense? > > Yes, I think it's starting to make sense now. Here's another option: > can't we play outside the JSON rules and send some "illegal" byte > sequences in json.c? Maybe some servers will grok this. At least I > think this should be attempted and the results collected for some > servers... I can test with 3 or 4 if you provide that json.c patch. > > Jo=C3=A3o
bug-gnu-emacs@HIDDEN:bug#79682; Package emacs.
Full text available.Received: (at 79682) by debbugs.gnu.org; 24 Oct 2025 16:50:22 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 24 12:50:22 2025 Received: from localhost ([127.0.0.1]:36938 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vCKzd-0003oF-Mv for submit <at> debbugs.gnu.org; Fri, 24 Oct 2025 12:50:22 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]:50582) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <joaotavora@HIDDEN>) id 1vCKzZ-0003nr-Qw for 79682 <at> debbugs.gnu.org; Fri, 24 Oct 2025 12:50:20 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-47117f92e32so21666725e9.1 for <79682 <at> debbugs.gnu.org>; Fri, 24 Oct 2025 09:50:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761324611; x=1761929411; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PHDtl1nvNf6uRU1584ptrayQmxk5WsbLlGSCPrr7ieQ=; b=cTGIvUp5/FDDJU650+aqvuaFYBvD9Dh/vcXSZ7N/EZftQydAWshBBmYvjZ+5bDU6rf nsgG22yzmfMFS+p5DIQ8WjW8tg73fNky0EQkV7QLIoe6ke9WFYnERZ1E4blbnG1Hmr0j D4/xonSg1jEZTsefSc4sfdWsG3bv2RjnAjU15Q7ATtMPDlQYbjgV9tV/LGCuYiatJwrz ocasJFHljGbRhgos0stUczEzBdHBGThrLeNCfxV0QUHvrpJAlsrb8dUo8ozmBc7NOxUz TkJoDLQyBGW3q5iSvb8Ju3B9GhgV8jaJw01x4Rw0UUF7A11kykMzlejmepy0epjcqYA1 l/+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761324611; x=1761929411; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=PHDtl1nvNf6uRU1584ptrayQmxk5WsbLlGSCPrr7ieQ=; b=qv4SCacIUfNqZ8rmnh94PPzlVh78vVK3KnLXgX/iKrQDmMimWuQDqp9ZPqouMaM0tA iL28KuwhHBM/D/w/jDfJemqNuN52emPGARZJzO0rZAlV+nEJVj0xvZWMPSqyrM4iKIKn wF4ldfpQZPZbec976W6SFNDECqgB/d0NJcSi9Ca3POOKEZ+y7crBFWJRLhX6h537cBtb 0UznsrWSflw7RFTou2DJfrbEyDjMReX696RnSvqgC3vmWHRdaQDZZIO1GDbhb5PlLvZO gQR9aNWYzPNtFFwkQKHHrcXRLtV8PoiWPTrqRxZKLNgZUeJMehGA+cwsmugO8L8wINYA 2q6Q== X-Forwarded-Encrypted: i=1; AJvYcCWRE7uo15CXB47udBxZu4KGt5A88hmsj7lAQ0I1R73mix2nW+5J+O8IPZwiBrn4sgnAqit3JQ==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yxqzyxrm2ACblhUax00vaNGujY8Lr7p7Ip72CdrcV/HVH0A/fJj xdCiyEMO1Q0RHLKwuMHv+l+TSRpS4UZx1HjTQjivYL7vx+L+3r2GCV6Xs4UTrw== X-Gm-Gg: ASbGncvuN2G1/pjK7d7YZWbi5mUKdIokRENK2sq1w/JDgJ8MiSJBw88I++MVf44fQp7 doDmsIEPbIQw50ucNhUIptV2onXIZHgmLBEsf0xGKTdESPOngWbCsYzPXg8gvUh9ATccXRQdPlx 7Zihsx78/IP33+fyHB2fgoTwlAdv2PX16954Y3CrcA4NZCbZBVhbys+SNSeHQrzzpS0Y7YKNpPE cJEXJDJPqywQ9MBJZgXSqVV0Bh/dbD8+GEEOlKkPiIGFw2mACN8WO2+8aBAxz9504l4e4R7PCRs sQ2Zz8f8W7rqPZP8M9Mp0/lhXZ3B4ELeH6apW73a9F9SX4tubz+IdBqR7JqU4PlDQQ+tq4NVJBa FesrSkC45I0I6LUPi/i+I086wQip8zXheisGq1d4gRHxWYGlAV71nqvf56ZLeous3eM6FnHNMVN NzC/Sy4hIx738lph0OPbd8ACA363al X-Google-Smtp-Source: AGHT+IFMwOQlTevwDh+l7Z6Ed56VGQ3ZlddmSQtET37PR0iHf+3mZa2GsgZVTfs4HDN8bM2RTxX6RQ== X-Received: by 2002:a5d:5d02:0:b0:40e:31a2:7efe with SMTP id ffacd0b85a97d-42704d522c4mr20523513f8f.14.1761324611031; Fri, 24 Oct 2025 09:50:11 -0700 (PDT) Received: from krug (87-196-72-166.net.novis.pt. [87.196.72.166]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-429897f57b7sm10199199f8f.16.2025.10.24.09.50.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Oct 2025 09:50:10 -0700 (PDT) From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= <joaotavora@HIDDEN> To: Eli Zaretskii <eliz@HIDDEN> Subject: Re: bug#79682: 31.0.50; Eglot does not support buffers containing special characters. In-Reply-To: <86ms5gu889.fsf@HIDDEN> References: <87frba6rhn.fsf@HIDDEN> <86347auii0.fsf@HIDDEN> <CALDnm51Qm73we9AFQKWLwbLFPmLOZ4AqFMQb8Y=f72LGSDjK7Q@HIDDEN> <86ms5gu889.fsf@HIDDEN> Date: Fri, 24 Oct 2025 17:51:35 +0100 Message-ID: <875xc45jl4.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 79682 Cc: isouthrain@HIDDEN, 79682 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Eli Zaretskii <eliz@HIDDEN> writes: >> From: Jo=C3=A3o T=C3=A1vora <joaotavora@HIDDEN> >> Date: Thu, 23 Oct 2025 16:43:25 +0100 >> Cc: ISouthRain <isouthrain@HIDDEN>, 79682 <at> debbugs.gnu.org >>=20 >> On Thu, Oct 23, 2025, 09:31 Eli Zaretskii <eliz@HIDDEN> wrote: >>=20 >> That character (0x161992) is beyond the last character supported by >> Unicode, which is 0x10ffff. I suspect that the LSP you are using >> cannot cope with non-Unicode characters.=20=20 >>=20 >> If this is true, then it's a server problem. > > Sorry, I don't follow. The error which the OP quoted: > >> > And then message buffer out: >> > ``` >> > Error running timer: (wrong-type-argument json-value-p "// -*- >coding: utf-8; -*- I must have missed this. I was commenting on your "I suspect the the LSP you are using cannot cope", the "LSP" in question meaning "the server" to me. > comes from Emacs. Specifically, it comes from json.c, when it tries > to serialize the information to be sent to the LSP server as JSON > object(s). JSON does not allow strings with characters outside of > Unicode codespace, and the offending character, 0x161992, is such a > character (Emacs supports character codepoints up to 0x3FFFFF). See > json.c:json_out_string, where it calls string_not_unicode. The > problematic character comes from the program source code in the > buffer. So how can this be a server problem, when it happens entirely > on our side? It's a problem of ours, you're right. I had misunderstood the problem. But, if you're right in the "JSON does not allow...outside Unicode" sentence, it's _also_ a problem of the server, in fact it's a problem of the LSP protocol itself, since it is based on JSONRPC, which obviously is based on JSON. >> Among the jobs of the LSP client, a particularly important one is to pro= vide the server with an accurate >> picture of the (saved on unsaved) document under the clients' control, s= o that the server can reconstruct it >> perfectly as if it had direct access to the disk. > > Perhaps we could replace such characters with a string "?", for > example, when we send the program text to the server? Not sure that wouldn't do more harm than good. It's proving the server with an wrong picture of the file. A checksum of it would be wrong, for example. (some servers actually have access to the file on disk and to the representation we make of the file.) Also, if you remember vaguely, LSP counts columns in octets or code points or something like that. So if we send just one byte, it could mess up the conting. Even though realistically your idea probably would work, it's a very big hack. Also why not do this hack in json.c?? That's where the limitation is (well, that's were we're closest to the source of the limitation, since the limitation is in JSON itself, according to you.) It's very akward to sanitize this output in Eglot. > If that is also impossible (i.e. will break some interaction with the > server), then I would suggest that Eglot catches json-value-p errors > and produces a more user-friendly error message, like > > Buffer text includes characters outside of Unicode codespace This makes more sense (sorry ISouthRain). But to confidently mention "buffer text" in that error we'd want to surround only some eglot--request/eglot--notify calls, which is awkward and confusing. I'd say it doesn't even make sense to start Eglot in such a buffer, so the check can happen much much earlier on, maybe in eglot--managed-mode. But even this could be tricky to do because this mode is started automaticaly in many situations. > Does this make sense? Yes, I think it's starting to make sense now. Here's another option: can't we play outside the JSON rules and send some "illegal" byte sequences in json.c? Maybe some servers will grok this. At least I think this should be attempted and the results collected for some servers... I can test with 3 or 4 if you provide that json.c patch. Jo=C3=A3o
bug-gnu-emacs@HIDDEN:bug#79682; Package emacs.
Full text available.Received: (at 79682) by debbugs.gnu.org; 24 Oct 2025 06:25:39 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 24 02:25:38 2025 Received: from localhost ([127.0.0.1]:34912 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vCBF4-0003a4-DX for submit <at> debbugs.gnu.org; Fri, 24 Oct 2025 02:25:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34896) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1vCBF0-0003ZE-JT for 79682 <at> debbugs.gnu.org; Fri, 24 Oct 2025 02:25:35 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1vCBEv-00034p-1H; Fri, 24 Oct 2025 02:25:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=sMM5SVIaoK7EF0A1juVJk3gtx1UKRGq/mHsTp7hMsSM=; b=FaB2cxaQFnqc3TzERrQi 0NJ5Ejny6uwgDIYTn+uK/8UlAS2uAxHabmSNj9Wu+fNZa8ciDov6eu+pcyF48Wome2Pzamkkds2Mb Nkf6EptQSDPYC5GWN8SRaA3LqEf4Y1AzcWyzejOBC37IjCu/gPOje96vAyKhcWfUZ86ovo/eDwkwX vRKhoE6al8G1HlvK1hXuyVLc4tvkl0XA8h7ryl7R/0TlFizxRiAqfYGs5pn/8mRzENgVGTCwENiEY v7GNS9QtjlNCYfFv9xR62qYFeUjj52wDTZ/c8vwpqk1sq+rPVJxz05xlmXWk88lJMuz/tWn81DEG7 8u9NGo4LvAyPQw==; Date: Fri, 24 Oct 2025 09:25:26 +0300 Message-Id: <86ms5gu889.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= <joaotavora@HIDDEN> In-Reply-To: <CALDnm51Qm73we9AFQKWLwbLFPmLOZ4AqFMQb8Y=f72LGSDjK7Q@HIDDEN> (message from =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= on Thu, 23 Oct 2025 16:43:25 +0100) Subject: Re: bug#79682: 31.0.50; Eglot does not support buffers containing special characters. References: <87frba6rhn.fsf@HIDDEN> <86347auii0.fsf@HIDDEN> <CALDnm51Qm73we9AFQKWLwbLFPmLOZ4AqFMQb8Y=f72LGSDjK7Q@HIDDEN> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79682 Cc: isouthrain@HIDDEN, 79682 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > From: João Távora <joaotavora@HIDDEN> > Date: Thu, 23 Oct 2025 16:43:25 +0100 > Cc: ISouthRain <isouthrain@HIDDEN>, 79682 <at> debbugs.gnu.org > > On Thu, Oct 23, 2025, 09:31 Eli Zaretskii <eliz@HIDDEN> wrote: > > That character (0x161992) is beyond the last character supported by > Unicode, which is 0x10ffff. I suspect that the LSP you are using > cannot cope with non-Unicode characters. > > If this is true, then it's a server problem. Sorry, I don't follow. The error which the OP quoted: > > And then message buffer out: > > ``` > > Error running timer: (wrong-type-argument json-value-p "// -*- coding: utf-8; -*- comes from Emacs. Specifically, it comes from json.c, when it tries to serialize the information to be sent to the LSP server as JSON object(s). JSON does not allow strings with characters outside of Unicode codespace, and the offending character, 0x161992, is such a character (Emacs supports character codepoints up to 0x3FFFFF). See json.c:json_out_string, where it calls string_not_unicode. The problematic character comes from the program source code in the buffer. So how can this be a server problem, when it happens entirely on our side? > But maybe Eglot could > somehow ignore it or translate it to some acceptable string? > > Among the jobs of the LSP client, a particularly important one is to provide the server with an accurate > picture of the (saved on unsaved) document under the clients' control, so that the server can reconstruct it > perfectly as if it had direct access to the disk. Perhaps we could replace such characters with a string "?", for example, when we send the program text to the server? If that is also impossible (i.e. will break some interaction with the server), then I would suggest that Eglot catches json-value-p errors and produces a more user-friendly error message, like Buffer text includes characters outside of Unicode codespace Does this make sense? > How can I insert this bizarre character into,say, a C++ file under > c++-ts-mode? Easy: type "C-x 8 RET 161992 RET".
bug-gnu-emacs@HIDDEN:bug#79682; Package emacs.
Full text available.Received: (at 79682) by debbugs.gnu.org; 24 Oct 2025 05:12:31 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 24 01:12:31 2025 Received: from localhost ([127.0.0.1]:34711 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vCA6G-0006wC-NK for submit <at> debbugs.gnu.org; Fri, 24 Oct 2025 01:12:31 -0400 Received: from mail-il1-x143.google.com ([2607:f8b0:4864:20::143]:48547) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <isouthrain@HIDDEN>) id 1vC5xj-0001wN-EV for 79682 <at> debbugs.gnu.org; Thu, 23 Oct 2025 20:47:24 -0400 Received: by mail-il1-x143.google.com with SMTP id e9e14a558f8ab-430b45ba0e4so7733535ab.1 for <79682 <at> debbugs.gnu.org>; Thu, 23 Oct 2025 17:47:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761266837; x=1761871637; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=xqc28ofrLXnLroMGxOTXFZ1fpSg6rUuXE5DmK3ok5Go=; b=OiA4wZf2JmqKYBIdbIwKckAtN/moPs/tMWDU9E7vdJvIRPLKc5C6s3j1cpgrWkEZQa CvhgBYMHDilkX7HZ086d9cP4Q53TbXsYt+/VOewERR+ejTBdpd+5glnkzujvGaP+ZoP0 UMq4Eu+6HbcTYPJ2hU9iJWNffEXcLKAVO4w12unLDolJXWf/D4kmzB+2zHp9+XW52VW+ FpeXonkDLVhQCDg9VMWF0ZSob0YVcSUcqf0bKRbxZxZHzWckFz5s7pojTLNd/ECAzCKM ZHOrWI4O1+ZJNJJ5X6k19qhduxQXw3PWb8ZHmiEATrgJ9QebVX4EXBn+/3ncV165hLNo 8ZhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761266837; x=1761871637; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=xqc28ofrLXnLroMGxOTXFZ1fpSg6rUuXE5DmK3ok5Go=; b=grGbCFBNL9b2XfDD4cxpTDJW5GgLEEru5xLiQVhiiBi3j20J6i2JiGMGrp47jkFXED a6fPgzM/7Rh+uavTEutnNFHQ8BsJC7RTOeXRxsTvWLekxk68RLkPive9Qi2vmBcvlcZp ZIJBs07PVfNT06YGoGg84YrsocETc1p02BdBGw/uGTjhtdz5mVz8ogY9RrW+7cdDbh7A d/zVvOwrAzV49L3CuJwSmGSzrriyaHzmbA98fnEOCOWqpGBvy243jDG1Nhm3Khg2jQ4A A6l9TNXUnnguu18Wl9ZQG5iWT4gecwEbWkT9SyEYTHSeDmMhAFBeF8CMihq9BNse7Pvq kuYg== X-Forwarded-Encrypted: i=1; AJvYcCXy+Ufpb3yhMR6D/Ok/xoPLyXjVQ3xBUDqntI5fo/W+RWl+F9S97Q3AdYvAXuh0InB67mXaTQ==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yy7uNXYyzK/BfvpRVpUzLx6ntY+KpCZ1Zi0BtPr/XrHnbMeOU8W /9+gECHw2HYVke1RU9wnGvDEyyJD9IJ2/zg0WL+Cb5lJc2qxPg9PNT76MmQUKXxgY+PBhbV74dk J2iuPhy9T8z/U6WPsM9ec6thgghxHSLQ= X-Gm-Gg: ASbGnculRUdX0YZv2IvSV7jA/bXxmcAJiWrhhuvDTSrYK3d9GKxdOCwOfFguMQPHr9T G8vuZIQq3YWhDlol4Q8Uc6nhEmSJsbqXV/6itz89JSSwcgn2YpylNu9ede2pV0+XNpdSUegXZ4l deiEkUMGOvPL8Z712Y/Hgn+heiqsiCZvMs6c422W0zl/V6RbWl8SoFS6Ti5OJSbkePgCTdlJnLW ll14vn7PUXLfMdh3zty7phpkuqv4ft1wnFRyfDeIcew4/nOlp7XiXwHQNyCPfP77rfNCKiR X-Google-Smtp-Source: AGHT+IHqg6R38uFsNt5rFlVoZYSQCYKoElGz1TmZvpiG6A7tJzvAo/UBOQsC5bi2B4zj4+KzbtkARcp4CiTVq3FyhLY= X-Received: by 2002:a05:6e02:2143:b0:42f:96ec:50a5 with SMTP id e9e14a558f8ab-431ebea144emr6911585ab.20.1761266836939; Thu, 23 Oct 2025 17:47:16 -0700 (PDT) MIME-Version: 1.0 References: <87frba6rhn.fsf@HIDDEN> <86347auii0.fsf@HIDDEN> <CALDnm51Qm73we9AFQKWLwbLFPmLOZ4AqFMQb8Y=f72LGSDjK7Q@HIDDEN> In-Reply-To: <CALDnm51Qm73we9AFQKWLwbLFPmLOZ4AqFMQb8Y=f72LGSDjK7Q@HIDDEN> From: Rain ISouth <isouthrain@HIDDEN> Date: Fri, 24 Oct 2025 08:46:50 +0800 X-Gm-Features: AS18NWDtY7vGbFCLt-9asjwDo7XVQdaLkYirq0zmSimyIphfErcBEzGjbuc-vlk Message-ID: <CAHOho1=Th2LagEry5kDmrGZEGNoObTno8oU60s_bNf3-G3vFsQ@HIDDEN> Subject: Re: bug#79682: 31.0.50; Eglot does not support buffers containing special characters. To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= <joaotavora@HIDDEN> Content-Type: multipart/mixed; boundary="0000000000002bc70e0641dce490" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 79682 X-Mailman-Approved-At: Fri, 24 Oct 2025 01:12:24 -0400 Cc: Eli Zaretskii <eliz@HIDDEN>, 79682 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --0000000000002bc70e0641dce490 Content-Type: multipart/alternative; boundary="0000000000002bc70c0641dce48e" --0000000000002bc70c0641dce48e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: base64 SSBzZW5kIGB0ZXN0LmNgIGZpbGUgdG8geW91Lg0KQW5kLCBjbGFuZ2QgdmVyc2lvbi4NCmBgYHNo ZWxsDQogY2xhbmdkIC0tdmVyc2lvbg0KKGJ1aWx0IGJ5IEJyZWNodCBTYW5kZXJzLCByMSkgY2xh bmdkIHZlcnNpb24gMTguMS44DQpGZWF0dXJlczogd2luZG93cw0KUGxhdGZvcm06IHg4Nl82NC13 NjQtd2luZG93cy1nbnU7IHRhcmdldD14ODZfNjQtdzY0LW1pbmd3MzINCmBgYA0KDQpJdCBzaG91 bGQgYmUgY2xhbmdkIHZlcnNpb24gaW5kZXBlbmRlbnQuDQoNCkpvw6NvIFTDoXZvcmEgPGpvYW90 YXZvcmFAZ21haWwuY29tPiDkuo4yMDI15bm0MTDmnIgyM+aXpeWRqOWbmyAyMzo0M+WGmemBk++8 mg0KDQo+DQo+DQo+IE9uIFRodSwgT2N0IDIzLCAyMDI1LCAwOTozMSBFbGkgWmFyZXRza2lpIDxl bGl6QGdudS5vcmc+IHdyb3RlOg0KPg0KPj4gPiBGcm9tOiBJU291dGhSYWluIDxpc291dGhyYWlu QGdtYWlsLmNvbT4NCj4+ID4gRGF0ZTogVGh1LCAyMyBPY3QgMjAyNSAxNDo1MTowMCArMDgwMA0K Pj4gPg0KPj4gPg0KPj4gPiDnu7TmiqTogIUsIOS9oOS7rOWlvSEhDQo+PiA+IOivt+WOn+iwheaI keS9v+eUqOaIkeeahOavjeivreiAjOS4jeaYryBFbmdsaXNoIOadpeWPjemmiOi/meS4qumXrumi mC4NCj4+ID4g5oiR5Y+R546w5LqG5LiA5Liq6Zeu6aKYLCDmnInlhbPkuo4gZWdsb3Qg5ZCv5Yqo 5aSx6LSl55qE6Zeu6aKYLg0KPj4gPiDlpoLmnpwgYnVmZmVyIOWGheWuueWtmOWcqCDnibnmrorl rZfnrKYsIOmCo+S5iCBlZ2xvdCDlkK/liqjlpLHotKUuDQo+PiA+IOWcqCBjYy1tb2RlIOS9v+eU qCBlZ2xvdCDlkK/liqggY2xhbmdkLg0KPj4gPiDmr5TlpoIgYnVmZmVyIOWGheWuueWtmOWcqDoN Cj4+ID4gYGBgQw0KPj4gPiAvLyBSZXR1cm46IO6WuiB0cnVlLS1PSyAgIGZhbHNlLS1FcnJvcg0K Pj4gPiBgYGANCj4+ID4g5oiR5LiN56Gu5a6a5Y+R6YCB5Yiw5L2g6YKj6L6555qE6YKu5Lu26L+Z 5Liq54m55q6K57yW56CB5piv5ZCm5a2Y5ZyoLCDlroPmmK86DQo+PiA+IFw1NDE0NjIyDQo+PiA+ DQo+PiA+IOWboOS4uuaIkeS8muWcqCBFbWFjcyDlpJbpg6jnvJbovpHlmajnvJbovpHmlofku7Ys IOaJgOS7peacieWPr+iDveS6p+eUn+i/meS4qiDnibnmrorlrZfnrKYuDQo+PiA+IOaJgOS7peaI keaDs+eci+eci+i/meaYr+WQpuWQiOeQhi4NCj4+ID4NCj4+ID4g5oSf6LCi5L2g5Lus55qE5bel 5L2cLCDnnJ/nmoQhIQ0KPj4NCj4+IFRyYW5zbGF0aW9uIHRvIEVuZ2xpc2g6DQo+Pg0KPj4gPiBC ZWNhdXNlIEkgZWRpdCBmaWxlcyBpbiBhbiBlZGl0b3Igb3V0c2lkZSBvZiBFbWFjcywgdGhpcyBz cGVjaWFsDQo+PiBjaGFyYWN0ZXIgbWlnaHQgYmUgcHJlc2VudC4NCj4+ID4gU28gSSB3YW50ZWQg dG8gc2VlIGlmIHRoaXMgaXMgcmVhc29uYWJsZS4NCj4+ID4NCj4+ID4gVGhhbmtzIGZvciB5b3Vy IHdvcmssIHJlYWxseSENCj4+DQo+PiBUaGF0IGNoYXJhY3RlciAoMHgxNjE5OTIpIGlzIGJleW9u ZCB0aGUgbGFzdCBjaGFyYWN0ZXIgc3VwcG9ydGVkIGJ5DQo+PiBVbmljb2RlLCB3aGljaCBpcyAw eDEwZmZmZi4gIEkgc3VzcGVjdCB0aGF0IHRoZSBMU1AgeW91IGFyZSB1c2luZw0KPj4gY2Fubm90 IGNvcGUgd2l0aCBub24tVW5pY29kZSBjaGFyYWN0ZXJzLg0KPg0KPg0KPiBJZiB0aGlzIGlzIHRy dWUsIHRoZW4gaXQncyBhIHNlcnZlciBwcm9ibGVtLg0KPg0KPiBCdXQgbWF5YmUgRWdsb3QgY291 bGQNCj4+IHNvbWVob3cgaWdub3JlIGl0IG9yIHRyYW5zbGF0ZSBpdCB0byBzb21lIGFjY2VwdGFi bGUgc3RyaW5nPw0KPj4NCj4NCj4gQW1vbmcgdGhlIGpvYnMgb2YgdGhlIExTUCBjbGllbnQsIGEg cGFydGljdWxhcmx5IGltcG9ydGFudCBvbmUgaXMgdG8NCj4gcHJvdmlkZSB0aGUgc2VydmVyIHdp dGggYW4gYWNjdXJhdGUgcGljdHVyZSBvZiB0aGUgKHNhdmVkIG9uIHVuc2F2ZWQpDQo+IGRvY3Vt ZW50IHVuZGVyIHRoZSBjbGllbnRzJyBjb250cm9sLCBzbyB0aGF0IHRoZSBzZXJ2ZXIgY2FuIHJl Y29uc3RydWN0IGl0DQo+IHBlcmZlY3RseSBhcyBpZiBpdCBoYWQgZGlyZWN0IGFjY2VzcyB0byB0 aGUgZGlzay4NCj4NCj4gU28gaWYgRWdsb3QgaXMgZG9pbmcgdGhpcyBqb2IgY29ycmVjdGx5IChp cyBpdD8pIHRoZW4gdGhlcmUncyBub3RoaW5nIGVsc2UNCj4gdG8gZG8uIFRoZSBwaWN0dXJlIHdl IHJlcG9ydCBvZiB0aGUgZmlsZSBzaGFsbCBub3QgZGlmZmVyIGZyb20gdGhlIHBpY3R1cmUNCj4g d2Ugb2JzZXJ2ZSwgaG93ZXZlciBpbXBlcmZlY3QgaXQgbWF5IGJlLg0KPg0KPiBTbyBwbGVhc2Ug cmVwb3J0IHRoaXMgdG8gdGhlIHNlcnZlciBkZXZlbG9wZXJzIGFuZC9vciBtYWtlIHRoZW0gYXdh cmUgb2YNCj4gdGhpcyBidWcgdGhyZWFkLg0KPg0KPiAgV2hhdCB2ZXJzaW9uIG9mIGNsYW5nZCBh cmUgeW91IHVzaW5nPyBIb3cgY2FuIEkgaW5zZXJ0IHRoaXMgYml6YXJyZQ0KPiBjaGFyYWN0ZXIg aW50byxzYXksIGEgQysrIGZpbGUgdW5kZXIgYysrLXRzLW1vZGU/DQo+DQo+IEpvw6NvDQo+DQo= --0000000000002bc70c0641dce48e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>I send `test.c` file to you.</div><div>And, clangd ve= rsion.</div><div>```shell</div><div>=C2=A0clangd --version<br>(built by Bre= cht Sanders, r1) clangd version 18.1.8<br>Features: windows<br>Platform: x8= 6_64-w64-windows-gnu; target=3Dx86_64-w64-mingw32</div><div>```</div><div><= br></div><div>It should be clangd version independent.</div></div><br><div = class=3D"gmail_quote gmail_quote_container"><div dir=3D"ltr" class=3D"gmail= _attr">Jo=C3=A3o T=C3=A1vora <<a href=3D"mailto:joaotavora@HIDDEN">jo= aotavora@HIDDEN</a>> =E4=BA=8E2025=E5=B9=B410=E6=9C=8823=E6=97=A5=E5= =91=A8=E5=9B=9B 23:43=E5=86=99=E9=81=93=EF=BC=9A<br></div><blockquote class= =3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rg= b(204,204,204);padding-left:1ex"><div dir=3D"auto"><div dir=3D"auto"><br></= div><div dir=3D"auto"><br></div><div dir=3D"auto">On Thu, Oct 23, 2025, 09:= 31 Eli Zaretskii <<a href=3D"mailto:eliz@HIDDEN" target=3D"_blank">eliz= @gnu.org</a>> wrote:</div><div class=3D"gmail_quote" dir=3D"auto"><block= quote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1= px solid rgb(204,204,204);padding-left:1ex">> From: ISouthRain <<a hr= ef=3D"mailto:isouthrain@HIDDEN" rel=3D"noreferrer" target=3D"_blank">iso= uthrain@HIDDEN</a>><br> > Date: Thu, 23 Oct 2025 14:51:00 +0800<br> > <br> > <br> > =E7=BB=B4=E6=8A=A4=E8=80=85, =E4=BD=A0=E4=BB=AC=E5=A5=BD!!<br> > =E8=AF=B7=E5=8E=9F=E8=B0=85=E6=88=91=E4=BD=BF=E7=94=A8=E6=88=91=E7=9A= =84=E6=AF=8D=E8=AF=AD=E8=80=8C=E4=B8=8D=E6=98=AF English =E6=9D=A5=E5=8F=8D= =E9=A6=88=E8=BF=99=E4=B8=AA=E9=97=AE=E9=A2=98.<br> > =E6=88=91=E5=8F=91=E7=8E=B0=E4=BA=86=E4=B8=80=E4=B8=AA=E9=97=AE=E9=A2= =98, =E6=9C=89=E5=85=B3=E4=BA=8E eglot =E5=90=AF=E5=8A=A8=E5=A4=B1=E8=B4=A5= =E7=9A=84=E9=97=AE=E9=A2=98.<br> > =E5=A6=82=E6=9E=9C buffer =E5=86=85=E5=AE=B9=E5=AD=98=E5=9C=A8 =E7=89= =B9=E6=AE=8A=E5=AD=97=E7=AC=A6, =E9=82=A3=E4=B9=88 eglot =E5=90=AF=E5=8A=A8= =E5=A4=B1=E8=B4=A5.<br> > =E5=9C=A8 cc-mode =E4=BD=BF=E7=94=A8 eglot =E5=90=AF=E5=8A=A8 clangd.<= br> > =E6=AF=94=E5=A6=82 buffer =E5=86=85=E5=AE=B9=E5=AD=98=E5=9C=A8:<br> > ```C<br> > // Return: =EE=96=BA true--OK=C2=A0 =C2=A0false--Error<br> > ```<br> > =E6=88=91=E4=B8=8D=E7=A1=AE=E5=AE=9A=E5=8F=91=E9=80=81=E5=88=B0=E4=BD= =A0=E9=82=A3=E8=BE=B9=E7=9A=84=E9=82=AE=E4=BB=B6=E8=BF=99=E4=B8=AA=E7=89=B9= =E6=AE=8A=E7=BC=96=E7=A0=81=E6=98=AF=E5=90=A6=E5=AD=98=E5=9C=A8, =E5=AE=83= =E6=98=AF:<br> > \5414622<br> > <br> > =E5=9B=A0=E4=B8=BA=E6=88=91=E4=BC=9A=E5=9C=A8 Emacs =E5=A4=96=E9=83=A8= =E7=BC=96=E8=BE=91=E5=99=A8=E7=BC=96=E8=BE=91=E6=96=87=E4=BB=B6, =E6=89=80= =E4=BB=A5=E6=9C=89=E5=8F=AF=E8=83=BD=E4=BA=A7=E7=94=9F=E8=BF=99=E4=B8=AA = =E7=89=B9=E6=AE=8A=E5=AD=97=E7=AC=A6.<br> > =E6=89=80=E4=BB=A5=E6=88=91=E6=83=B3=E7=9C=8B=E7=9C=8B=E8=BF=99=E6=98= =AF=E5=90=A6=E5=90=88=E7=90=86.<br> > <br> > =E6=84=9F=E8=B0=A2=E4=BD=A0=E4=BB=AC=E7=9A=84=E5=B7=A5=E4=BD=9C, =E7= =9C=9F=E7=9A=84!!<br> <br> Translation to English:<br><br> > Because I edit files in an editor outside of Emacs, this special chara= cter might be present.<br> > So I wanted to see if this is reasonable.<br> > <br> > Thanks for your work, really!<br> <br> That character (0x161992) is beyond the last character supported by<br> Unicode, which is 0x10ffff.=C2=A0 I suspect that the LSP you are using<br> cannot cope with non-Unicode characters.=C2=A0 </blockquote></div><div dir= =3D"auto"><br></div><div dir=3D"auto">If this is true, then it's a serv= er problem.</div><div dir=3D"auto"><br></div><div class=3D"gmail_quote" dir= =3D"auto"><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8= ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">But maybe Eglot= could<br> somehow ignore it or translate it to some acceptable string?<br></blockquot= e></div><div dir=3D"auto"><br></div><div dir=3D"auto">Among the jobs of the= LSP client, a particularly important one is to provide the server with an = accurate picture of the (saved on unsaved) document under the clients' = control, so that the server can reconstruct it perfectly as if it had direc= t access to the disk.</div><div dir=3D"auto"><br></div><div dir=3D"auto">So= if Eglot is doing this job correctly (is it?) then there's nothing els= e to do. The picture we report of the file shall not differ from the pictur= e we observe, however imperfect it may be.</div><div dir=3D"auto"><br></div= ><div dir=3D"auto">So please report this to the server developers and/or ma= ke them aware of this bug thread.</div><div dir=3D"auto"><br></div><div dir= =3D"auto">=C2=A0What version of clangd are you using? How can I insert this= bizarre character into,say, a C++ file under c++-ts-mode?</div><div dir=3D= "auto"><br></div><div dir=3D"auto">Jo=C3=A3o</div></div> </blockquote></div> --0000000000002bc70c0641dce48e-- --0000000000002bc70e0641dce490 Content-Type: text/plain; charset="UTF-8"; name="test.c" Content-Disposition: attachment; filename="test.c" Content-Transfer-Encoding: base64 Content-ID: <f_mh44n4wc0> X-Attachment-Id: f_mh44n4wc0 Ly8gLSotIGNvZGluZzogdXRmLTg7IC0qLQ0KDQoNCi8vIFJldHVybjog9aGmkiB0cnVlLS1PSyAg IGZhbHNlLS1FcnJvcg0K --0000000000002bc70e0641dce490--
bug-gnu-emacs@HIDDEN:bug#79682; Package emacs.
Full text available.Received: (at 79682) by debbugs.gnu.org; 23 Oct 2025 15:43:45 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 23 11:43:45 2025 Received: from localhost ([127.0.0.1]:33351 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vBxTd-0002gs-7h for submit <at> debbugs.gnu.org; Thu, 23 Oct 2025 11:43:45 -0400 Received: from mail-oo1-xc35.google.com ([2607:f8b0:4864:20::c35]:42074) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <joaotavora@HIDDEN>) id 1vBxTa-0002ge-Ex for 79682 <at> debbugs.gnu.org; Thu, 23 Oct 2025 11:43:43 -0400 Received: by mail-oo1-xc35.google.com with SMTP id 006d021491bc7-653f238e7b4so542001eaf.0 for <79682 <at> debbugs.gnu.org>; Thu, 23 Oct 2025 08:43:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761234216; x=1761839016; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=LqDIDUCbmqELYYIPmKKq7kzLHuCM2m877sDwrsQRB/k=; b=f084jxbXwiWlbZYrz2tb1Fp2tjisr0pYiSRm+qaHmv5lXqgDYspownQ36B9MSHR4GD IX89UUy7eY0REGYfMYqjDXYvgWpPyIvOgbxt/6A+CPDs9Xx7cpy5NHRjlTGTK6hi5vYc wZ7THoEkxO7NRVwbi9aLpnIcGMQMeSsuipmxwzKPPU5rG9rQDLb3R21yeKtceRp7Csg0 voQeZi/zGVhKat9DLidL65sdv94e9ZjjdVC8qLCD8naLnd8OtIyvPu4ZpK6QISwV0Ywh izbCIzrnGjhddH4zsIJzA5KG1PeuQunEtdCZbk0NApICdDs8XghmPEYdyrbVDhOPpsd6 FPvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761234216; x=1761839016; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=LqDIDUCbmqELYYIPmKKq7kzLHuCM2m877sDwrsQRB/k=; b=qZc4iOqujzcrBLZhLod7ix5Wqs8DrjAvRWp9sBpJNgL5pTlCJoj0p14yE9t/0d4iNS ewEMoE94poF7toqPpVZd7D7KgQ4PQW7ufuIgpp4NHfEE0T02xppjWCZomH1PibpJ3DxK iDofQkFOIXQiqhMgc1i96E6jAFTMOKt1M9RHTPfrkccEtIozynx2+eGUqSSNktDAJMhZ xBHlf96tWvV6jo7t7eKzGELq+WSf3sed3XtQhzLBEBC+DoU4sBjCpqDW+KG2tZHo02md v49QykY1cSaDBNoPL1m2+i0xtQRDvNnuicIOSkADL7Pl3CJqYhPO33IdQsKC7Hx1Iv5j gU9g== X-Forwarded-Encrypted: i=1; AJvYcCUlr6StOzZhRo7p3ntKBFdIIiRsTxRcqacCGJHXROg5ze9GBfrV6TKMo73jJLP7NxIo7rJFJA==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yzl1dhW22QXWpnh4xZUUA8TJgkYlgboGQ0NGMCYJMcNEhWWoY54 CQIOKnM45FPtiQ4c6TxvJ6d7YTWzbDMVCp+S5OWv1nuh61/IqURqc2nXVSQQLK3vZ5571ixyd7z aW8Mw0NfuFqXx8ZCnVJDUosYTFgBBroE= X-Gm-Gg: ASbGncsfKCtl2jkRllCreNNiFsCEVX4gGoUPQt++Tw2sbxfAdBmj8eQnPXurFs5FOUJ Bp6TADitI9Yq51+3hbFlnR/d8RHvbnkaSacEoW2ZiszOMWxqOSek0s8T6R0ZcVIQB77YfFQaVhi MGf30F5EZjdTyCBmNjrGLtOBBw6ibIUPvOQ42UfAAxi3OTNnuQzCV93keH1VWXYhoIO27x6pfRV T0lWDrr6gaQfoD6FS59F9M9X+8QFuYHdH5aLHMRKey4iVEvcmIYJUoFt4u3bw8Ca8W4fRU= X-Google-Smtp-Source: AGHT+IFWueWXBKlO6VfU8feUd4p/vW4Z4jemiL2cMyiiREUGpbPstAbaBlA0oQHZvpOaRfKdhgv2TB2oc4vlHcO4QnU= X-Received: by 2002:a05:6808:3c4a:b0:441:d1ce:d8bc with SMTP id 5614622812f47-44bbcf43921mr2278440b6e.15.1761234216003; Thu, 23 Oct 2025 08:43:36 -0700 (PDT) MIME-Version: 1.0 References: <87frba6rhn.fsf@HIDDEN> <86347auii0.fsf@HIDDEN> In-Reply-To: <86347auii0.fsf@HIDDEN> From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= <joaotavora@HIDDEN> Date: Thu, 23 Oct 2025 16:43:25 +0100 X-Gm-Features: AS18NWBqZrOB2kJl5FbG9IBGghSXqo1s5C-VV1fwcVPFIaPZYO6tnUQeADYQ4kc Message-ID: <CALDnm51Qm73we9AFQKWLwbLFPmLOZ4AqFMQb8Y=f72LGSDjK7Q@HIDDEN> Subject: Re: bug#79682: 31.0.50; Eglot does not support buffers containing special characters. To: Eli Zaretskii <eliz@HIDDEN> Content-Type: multipart/alternative; boundary="000000000000cfac840641d54b1e" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 79682 Cc: ISouthRain <isouthrain@HIDDEN>, 79682 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --000000000000cfac840641d54b1e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: base64 T24gVGh1LCBPY3QgMjMsIDIwMjUsIDA5OjMxIEVsaSBaYXJldHNraWkgPGVsaXpAZ251Lm9yZz4g d3JvdGU6DQoNCj4gPiBGcm9tOiBJU291dGhSYWluIDxpc291dGhyYWluQGdtYWlsLmNvbT4NCj4g PiBEYXRlOiBUaHUsIDIzIE9jdCAyMDI1IDE0OjUxOjAwICswODAwDQo+ID4NCj4gPg0KPiA+IOe7 tOaKpOiAhSwg5L2g5Lus5aW9ISENCj4gPiDor7fljp/osIXmiJHkvb/nlKjmiJHnmoTmr43or63o gIzkuI3mmK8gRW5nbGlzaCDmnaXlj43ppojov5nkuKrpl67popguDQo+ID4g5oiR5Y+R546w5LqG 5LiA5Liq6Zeu6aKYLCDmnInlhbPkuo4gZWdsb3Qg5ZCv5Yqo5aSx6LSl55qE6Zeu6aKYLg0KPiA+ IOWmguaenCBidWZmZXIg5YaF5a655a2Y5ZyoIOeJueauiuWtl+espiwg6YKj5LmIIGVnbG90IOWQ r+WKqOWksei0pS4NCj4gPiDlnKggY2MtbW9kZSDkvb/nlKggZWdsb3Qg5ZCv5YqoIGNsYW5nZC4N Cj4gPiDmr5TlpoIgYnVmZmVyIOWGheWuueWtmOWcqDoNCj4gPiBgYGBDDQo+ID4gLy8gUmV0dXJu OiDulrogdHJ1ZS0tT0sgICBmYWxzZS0tRXJyb3INCj4gPiBgYGANCj4gPiDmiJHkuI3noa7lrprl j5HpgIHliLDkvaDpgqPovrnnmoTpgq7ku7bov5nkuKrnibnmrornvJbnoIHmmK/lkKblrZjlnKgs IOWug+aYrzoNCj4gPiBcNTQxNDYyMg0KPiA+DQo+ID4g5Zug5Li65oiR5Lya5ZyoIEVtYWNzIOWk lumDqOe8lui+keWZqOe8lui+keaWh+S7tiwg5omA5Lul5pyJ5Y+v6IO95Lqn55Sf6L+Z5LiqIOeJ ueauiuWtl+espi4NCj4gPiDmiYDku6XmiJHmg7PnnIvnnIvov5nmmK/lkKblkIjnkIYuDQo+ID4N Cj4gPiDmhJ/osKLkvaDku6znmoTlt6XkvZwsIOecn+eahCEhDQo+DQo+IFRyYW5zbGF0aW9uIHRv IEVuZ2xpc2g6DQo+DQo+ID4gQmVjYXVzZSBJIGVkaXQgZmlsZXMgaW4gYW4gZWRpdG9yIG91dHNp ZGUgb2YgRW1hY3MsIHRoaXMgc3BlY2lhbA0KPiBjaGFyYWN0ZXIgbWlnaHQgYmUgcHJlc2VudC4N Cj4gPiBTbyBJIHdhbnRlZCB0byBzZWUgaWYgdGhpcyBpcyByZWFzb25hYmxlLg0KPiA+DQo+ID4g VGhhbmtzIGZvciB5b3VyIHdvcmssIHJlYWxseSENCj4NCj4gVGhhdCBjaGFyYWN0ZXIgKDB4MTYx OTkyKSBpcyBiZXlvbmQgdGhlIGxhc3QgY2hhcmFjdGVyIHN1cHBvcnRlZCBieQ0KPiBVbmljb2Rl LCB3aGljaCBpcyAweDEwZmZmZi4gIEkgc3VzcGVjdCB0aGF0IHRoZSBMU1AgeW91IGFyZSB1c2lu Zw0KPiBjYW5ub3QgY29wZSB3aXRoIG5vbi1Vbmljb2RlIGNoYXJhY3RlcnMuDQoNCg0KSWYgdGhp cyBpcyB0cnVlLCB0aGVuIGl0J3MgYSBzZXJ2ZXIgcHJvYmxlbS4NCg0KQnV0IG1heWJlIEVnbG90 IGNvdWxkDQo+IHNvbWVob3cgaWdub3JlIGl0IG9yIHRyYW5zbGF0ZSBpdCB0byBzb21lIGFjY2Vw dGFibGUgc3RyaW5nPw0KPg0KDQpBbW9uZyB0aGUgam9icyBvZiB0aGUgTFNQIGNsaWVudCwgYSBw YXJ0aWN1bGFybHkgaW1wb3J0YW50IG9uZSBpcyB0bw0KcHJvdmlkZSB0aGUgc2VydmVyIHdpdGgg YW4gYWNjdXJhdGUgcGljdHVyZSBvZiB0aGUgKHNhdmVkIG9uIHVuc2F2ZWQpDQpkb2N1bWVudCB1 bmRlciB0aGUgY2xpZW50cycgY29udHJvbCwgc28gdGhhdCB0aGUgc2VydmVyIGNhbiByZWNvbnN0 cnVjdCBpdA0KcGVyZmVjdGx5IGFzIGlmIGl0IGhhZCBkaXJlY3QgYWNjZXNzIHRvIHRoZSBkaXNr Lg0KDQpTbyBpZiBFZ2xvdCBpcyBkb2luZyB0aGlzIGpvYiBjb3JyZWN0bHkgKGlzIGl0PykgdGhl biB0aGVyZSdzIG5vdGhpbmcgZWxzZQ0KdG8gZG8uIFRoZSBwaWN0dXJlIHdlIHJlcG9ydCBvZiB0 aGUgZmlsZSBzaGFsbCBub3QgZGlmZmVyIGZyb20gdGhlIHBpY3R1cmUNCndlIG9ic2VydmUsIGhv d2V2ZXIgaW1wZXJmZWN0IGl0IG1heSBiZS4NCg0KU28gcGxlYXNlIHJlcG9ydCB0aGlzIHRvIHRo ZSBzZXJ2ZXIgZGV2ZWxvcGVycyBhbmQvb3IgbWFrZSB0aGVtIGF3YXJlIG9mDQp0aGlzIGJ1ZyB0 aHJlYWQuDQoNCiBXaGF0IHZlcnNpb24gb2YgY2xhbmdkIGFyZSB5b3UgdXNpbmc/IEhvdyBjYW4g SSBpbnNlcnQgdGhpcyBiaXphcnJlDQpjaGFyYWN0ZXIgaW50byxzYXksIGEgQysrIGZpbGUgdW5k ZXIgYysrLXRzLW1vZGU/DQoNCkpvw6NvDQo= --000000000000cfac840641d54b1e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"auto"><div dir=3D"auto"><br></div><div dir=3D"auto"><br></div><= div data-smartmail=3D"gmail_signature" dir=3D"auto">On Thu, Oct 23, 2025, 0= 9:31 Eli Zaretskii <<a href=3D"mailto:eliz@HIDDEN">eliz@HIDDEN</a>>= wrote:</div><div class=3D"gmail_quote gmail_quote_container" dir=3D"auto">= <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-= left:1px solid rgb(204,204,204);padding-left:1ex">> From: ISouthRain <= ;<a href=3D"mailto:isouthrain@HIDDEN" target=3D"_blank" rel=3D"noreferre= r">isouthrain@HIDDEN</a>><br> > Date: Thu, 23 Oct 2025 14:51:00 +0800<br> > <br> > <br> > =E7=BB=B4=E6=8A=A4=E8=80=85, =E4=BD=A0=E4=BB=AC=E5=A5=BD!!<br> > =E8=AF=B7=E5=8E=9F=E8=B0=85=E6=88=91=E4=BD=BF=E7=94=A8=E6=88=91=E7=9A= =84=E6=AF=8D=E8=AF=AD=E8=80=8C=E4=B8=8D=E6=98=AF English =E6=9D=A5=E5=8F=8D= =E9=A6=88=E8=BF=99=E4=B8=AA=E9=97=AE=E9=A2=98.<br> > =E6=88=91=E5=8F=91=E7=8E=B0=E4=BA=86=E4=B8=80=E4=B8=AA=E9=97=AE=E9=A2= =98, =E6=9C=89=E5=85=B3=E4=BA=8E eglot =E5=90=AF=E5=8A=A8=E5=A4=B1=E8=B4=A5= =E7=9A=84=E9=97=AE=E9=A2=98.<br> > =E5=A6=82=E6=9E=9C buffer =E5=86=85=E5=AE=B9=E5=AD=98=E5=9C=A8 =E7=89= =B9=E6=AE=8A=E5=AD=97=E7=AC=A6, =E9=82=A3=E4=B9=88 eglot =E5=90=AF=E5=8A=A8= =E5=A4=B1=E8=B4=A5.<br> > =E5=9C=A8 cc-mode =E4=BD=BF=E7=94=A8 eglot =E5=90=AF=E5=8A=A8 clangd.<= br> > =E6=AF=94=E5=A6=82 buffer =E5=86=85=E5=AE=B9=E5=AD=98=E5=9C=A8:<br> > ```C<br> > // Return: =EE=96=BA true--OK=C2=A0 =C2=A0false--Error<br> > ```<br> > =E6=88=91=E4=B8=8D=E7=A1=AE=E5=AE=9A=E5=8F=91=E9=80=81=E5=88=B0=E4=BD= =A0=E9=82=A3=E8=BE=B9=E7=9A=84=E9=82=AE=E4=BB=B6=E8=BF=99=E4=B8=AA=E7=89=B9= =E6=AE=8A=E7=BC=96=E7=A0=81=E6=98=AF=E5=90=A6=E5=AD=98=E5=9C=A8, =E5=AE=83= =E6=98=AF:<br> > \5414622<br> > <br> > =E5=9B=A0=E4=B8=BA=E6=88=91=E4=BC=9A=E5=9C=A8 Emacs =E5=A4=96=E9=83=A8= =E7=BC=96=E8=BE=91=E5=99=A8=E7=BC=96=E8=BE=91=E6=96=87=E4=BB=B6, =E6=89=80= =E4=BB=A5=E6=9C=89=E5=8F=AF=E8=83=BD=E4=BA=A7=E7=94=9F=E8=BF=99=E4=B8=AA = =E7=89=B9=E6=AE=8A=E5=AD=97=E7=AC=A6.<br> > =E6=89=80=E4=BB=A5=E6=88=91=E6=83=B3=E7=9C=8B=E7=9C=8B=E8=BF=99=E6=98= =AF=E5=90=A6=E5=90=88=E7=90=86.<br> > <br> > =E6=84=9F=E8=B0=A2=E4=BD=A0=E4=BB=AC=E7=9A=84=E5=B7=A5=E4=BD=9C, =E7= =9C=9F=E7=9A=84!!<br> <br> Translation to English:<br><br> > Because I edit files in an editor outside of Emacs, this special chara= cter might be present.<br> > So I wanted to see if this is reasonable.<br> > <br> > Thanks for your work, really!<br> <br> That character (0x161992) is beyond the last character supported by<br> Unicode, which is 0x10ffff.=C2=A0 I suspect that the LSP you are using<br> cannot cope with non-Unicode characters.=C2=A0 </blockquote></div><div dir= =3D"auto"><br></div><div dir=3D"auto">If this is true, then it's a serv= er problem.</div><div dir=3D"auto"><br></div><div class=3D"gmail_quote gmai= l_quote_container" dir=3D"auto"><blockquote class=3D"gmail_quote" style=3D"= margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-lef= t:1ex">But maybe Eglot could<br> somehow ignore it or translate it to some acceptable string?<br></blockquot= e></div><div dir=3D"auto"><br></div><div dir=3D"auto">Among the jobs of the= LSP client, a particularly important one is to provide the server with an = accurate picture of the (saved on unsaved) document under the clients' = control, so that the server can reconstruct it perfectly as if it had direc= t access to the disk.</div><div dir=3D"auto"><br></div><div dir=3D"auto">So= if Eglot is doing this job correctly (is it?) then there's nothing els= e to do. The picture we report of the file shall not differ from the pictur= e we observe, however imperfect it may be.</div><div dir=3D"auto"><br></div= ><div dir=3D"auto">So please report this to the server developers and/or ma= ke them aware of this bug thread.</div><div dir=3D"auto"><br></div><div dir= =3D"auto">=C2=A0What version of clangd are you using? How can I insert this= bizarre character into,say, a C++ file under c++-ts-mode?</div><div dir=3D= "auto"><br></div><div dir=3D"auto">Jo=C3=A3o</div></div> --000000000000cfac840641d54b1e--
bug-gnu-emacs@HIDDEN:bug#79682; Package emacs.
Full text available.
Received: (at 79682) by debbugs.gnu.org; 23 Oct 2025 13:29:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 23 09:29:34 2025
Received: from localhost ([127.0.0.1]:60562 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1vBvNl-0002kH-I1
for submit <at> debbugs.gnu.org; Thu, 23 Oct 2025 09:29:34 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:35480)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1vBvNf-0002jr-Nd
for 79682 <at> debbugs.gnu.org; Thu, 23 Oct 2025 09:29:31 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
id 1vBvNa-0001LO-Ci; Thu, 23 Oct 2025 09:29:22 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
s=fencepost-gnu-org; h=MIME-Version:References:Subject:In-Reply-To:To:From:
Date; bh=0pg51gQsSV2bVAR7soeaBryijR3PAewlYOWjifzpPto=; b=WQ+CARllu5M+tyqv82Z2
QoMAt7jA5wpRyRq8alwlwS+5xeH0vz3aG2UXg6+Zl9c+taIOgD10nLivau85ctxsb3GP+rewJem0v
VwIiSoMrfawk/sgn9FF8b4AF079rp1+Nf7ietGlJWvNVruwDG/VBIvmZZAbfPQznieP25qr2JbDIN
jrDiY1NfMnlvrGtnqiecyRt8a5P9etogFPmbSFVmmI+XTKG2q9oZ4vDmQOHoBwqP/Qqjx6bEncivI
WrvlbidyBFjnL0XtYhkM+VTrwqXhoGbqqhVLPil5tdSAKDehZt+70lbfNCFAtHraFIslSC2pc6as3
pUDtgqq6wZ/UNw==;
Date: Thu, 23 Oct 2025 16:29:15 +0300
Message-Id: <86sef9u4pg.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: ISouthRain <isouthrain@HIDDEN>
In-Reply-To: <86tszpiwr3.fsf@HIDDEN> (message from ISouthRain on Thu, 23
Oct 2025 21:16:32 +0800)
Subject: Re: bug#79682: 31.0.50; Eglot does not support buffers containing
special characters.
References: <87frba6rhn.fsf@HIDDEN> <86347auii0.fsf@HIDDEN>
<86tszpiwr3.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=gbk
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 79682
Cc: joaotavora@HIDDEN, 79682 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)
[Please always use Reply to All to reply, to keep everyone CC'ed.]
> From: ISouthRain <isouthrain@HIDDEN>
> Date: Thu, 23 Oct 2025 21:16:32 +0800
>=20
> Eli Zaretskii <eliz@HIDDEN> writes:
>=20
> > That character (0x161992) is beyond the last character supported by
> > Unicode, which is 0x10ffff. I suspect that the LSP you are using
> > cannot cope with non-Unicode characters. But maybe Eglot could
> > somehow ignore it or translate it to some acceptable string?
> >
> > Can you show what does "eglot will fail to start" really mean? Do you
> > see some error message or something?
> >
> > Joao, any suggestions?
>=20
> Start Test:=20
>=20
> emacs -Q
>=20
> Open test.c:
> ```C
> // -*- coding: utf-8; -*-
>=20
> // Return: =A3t true--OK false--Error
> ```
> And then message buffer out:
> ```
> Error running timer: (wrong-type-argument json-value-p "// -*- coding: ut=
f-8; -*-
This is expected: JSON cannot handle non-Unicode characters.
>=20
> // Return: =A3t true--OK false--Error
> ")
> ```
>=20
> In them mode-line show [eglot:MyProject/error]
>=20
> Here's the content of the `eglot-events-buffer`:
> ```
> [jsonrpc] D[21:06:15.844] Running language server: f:/App/Scoop/apps/ming=
w-winlibs-llvm-ucrt/current/bin/clangd.exe
> [jsonrpc] e[21:06:15.846] --> initialize[1] {"jsonrpc":"2.0","id":1,"meth=
od":"initialize","params":{"processId":13204,"clientInfo":{"name":"Eglot","=
version":"1.18"},"rootPath":"c:/Users/Jack/Desktop/C/","rootUri":"file:///c=
%3A/Users/Jack/Desktop/C","initializationOptions":{},"capabilities":{"works=
pace":{"applyEdit":true,"executeCommand":{"dynamicRegistration":false},"wor=
kspaceEdit":{"documentChanges":true},"didChangeWatchedFiles":{"dynamicRegis=
tration":true},"symbol":{"dynamicRegistration":false},"configuration":true,=
"workspaceFolders":true},"textDocument":{"synchronization":{"dynamicRegistr=
ation":false,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"comp=
letion":{"dynamicRegistration":false,"completionItem":{"snippetSupport":fal=
se,"deprecatedSupport":true,"resolveSupport":{"properties":["documentation"=
,"details","additionalTextEdits"]},"tagSupport":{"valueSet":[1]},"insertRep=
laceSupport":true},"contextSupport":true},"hover":{"dynamicRegistration":fa=
lse,"contentFormat":["plaintext"]},"signatureHelp":{"dynamicRegistration":f=
alse,"signatureInformation":{"parameterInformation":{"labelOffsetSupport":t=
rue},"documentationFormat":["plaintext"],"activeParameterSupport":true}},"r=
eferences":{"dynamicRegistration":false},"definition":{"dynamicRegistration=
":false,"linkSupport":true},"declaration":{"dynamicRegistration":false,"lin=
kSupport":true},"implementation":{"dynamicRegistration":false,"linkSupport"=
:true},"typeDefinition":{"dynamicRegistration":false,"linkSupport":true},"d=
ocumentSymbol":{"dynamicRegistration":false,"hierarchicalDocumentSymbolSupp=
ort":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,=
17,18,19,20,21,22,23,24,25,26]}},"documentHighlight":{"dynamicRegistration"=
:false},"codeAction":{"dynamicRegistration":false,"resolveSupport":{"proper=
ties":["edit","command"]},"dataSupport":true,"codeActionLiteralSupport":{"c=
odeActionKind":{"valueSet":["quickfix","refactor","refactor.extract","refac=
tor.inline","refactor.rewrite","source","source.organizeImports"]}},"isPref=
erredSupport":true},"formatting":{"dynamicRegistration":false},"rangeFormat=
ting":{"dynamicRegistration":false},"rename":{"dynamicRegistration":false},=
"inlayHint":{"dynamicRegistration":false},"callHierarchy":{"dynamicRegistra=
tion":false},"typeHierarchy":{"dynamicRegistration":false},"publishDiagnost=
ics":{"relatedInformation":false,"versionSupport":true,"codeDescriptionSupp=
ort":false,"tagSupport":{"valueSet":[1,2]}}},"window":{"showDocument":{"sup=
port":true},"showMessage":{"messageActionItem":{"additionalPropertiesSuppor=
t":true}},"workDoneProgress":true},"general":{"positionEncodings":["utf-32"=
,"utf-8","utf-16"]},"experimental":{}},"workspaceFolders":[{"uri":"file:///=
c%3A/Users/Jack/Desktop/C","name":"c:/Users/Jack/Desktop/C/"}]}}
> [stderr] I[21:06:15.884] (built by Brecht Sanders, r1) clangd version 18=
.1.8
> [stderr] I[21:06:15.884] Features: windows
> [stderr] I[21:06:15.884] PID: 18176
> [stderr] I[21:06:15.884] Working directory: c:/Users/Jack/Desktop/C
> [stderr] I[21:06:15.884] argv[0]: f:/App/Scoop/apps/mingw-winlibs-llvm-u=
crt/current/bin/clangd.exe
> [stderr] I[21:06:15.886] Starting LSP over stdin/stdout
> [stderr] I[21:06:15.886] <-- initialize(1)
> [stderr] I[21:06:15.888] --> reply:initialize(1) 1 ms
> [jsonrpc] e[21:06:15.888] <-- initialize[1] {"id":1,"jsonrpc":"2.0","resu=
lt":{"capabilities":{"astProvider":true,"callHierarchyProvider":true,"clang=
dInlayHintsProvider":true,"codeActionProvider":{"codeActionKinds":["quickfi=
x","refactor","info"]},"compilationDatabase":{"automaticReload":true},"comp=
letionProvider":{"resolveProvider":false,"triggerCharacters":[".","<",">","=
:","\"","/","*"]},"declarationProvider":true,"definitionProvider":true,"doc=
umentFormattingProvider":true,"documentHighlightProvider":true,"documentLin=
kProvider":{"resolveProvider":false},"documentOnTypeFormattingProvider":{"f=
irstTriggerCharacter":"\n","moreTriggerCharacter":[]},"documentRangeFormatt=
ingProvider":true,"documentSymbolProvider":true,"executeCommandProvider":{"=
commands":["clangd.applyFix","clangd.applyTweak"]},"foldingRangeProvider":t=
rue,"hoverProvider":true,"implementationProvider":true,"inactiveRegionsProv=
ider":true,"inlayHintProvider":true,"memoryUsageProvider":true,"referencesP=
rovider":true,"renameProvider":true,"selectionRangeProvider":true,"semantic=
TokensProvider":{"full":{"delta":true},"legend":{"tokenModifiers":["declara=
tion","definition","deprecated","deduced","readonly","static","abstract","v=
irtual","dependentName","defaultLibrary","usedAsMutableReference","usedAsMu=
tablePointer","constructorOrDestructor","userDefined","functionScope","clas=
sScope","fileScope","globalScope"],"tokenTypes":["variable","variable","par=
ameter","function","method","function","property","variable","class","inter=
face","enum","enumMember","type","type","unknown","namespace","typeParamete=
r","concept","type","macro","modifier","operator","bracket","label","commen=
t"]},"range":false},"signatureHelpProvider":{"triggerCharacters":["(",")","=
{","}","<",">",","]},"standardTypeHierarchyProvider":true,"textDocumentSync=
":{"change":2,"openClose":true,"save":true},"typeDefinitionProvider":true,"=
typeHierarchyProvider":true,"workspaceSymbolProvider":true},"serverInfo":{"=
name":"clangd","version":"(built by Brecht Sanders, r1) clangd version 18.1=
.8 windows x86_64-w64-windows-gnu; target=3Dx86_64-w64-mingw32"}}}
> [jsonrpc] e[21:06:15.888] --> initialized {"jsonrpc":"2.0","method":"init=
ialized","params":{}}
> [stderr] I[21:06:15.888] <-- initialized
> [jsonrpc] e[21:06:16.438] --> textDocument/codeAction[2] {"jsonrpc":"2.0"=
,"id":2,"method":"textDocument/codeAction","params":{"textDocument":{"uri":=
"file:///c%3A/Users/Jack/Desktop/C/test.c"},"range":{"start":{"line":0,"cha=
racter":0},"end":{"line":3,"character":0}},"context":{"diagnostics":[],"tri=
ggerKind":2}}}
> [jsonrpc] e[21:06:16.438] --> textDocument/documentHighlight[3] {"jsonrpc=
":"2.0","id":3,"method":"textDocument/documentHighlight","params":{"textDoc=
ument":{"uri":"file:///c%3A/Users/Jack/Desktop/C/test.c"},"position":{"line=
":0,"character":3}}}
> [jsonrpc] e[21:06:16.438] --> textDocument/hover[4] {"jsonrpc":"2.0","id"=
:4,"method":"textDocument/hover","params":{"textDocument":{"uri":"file:///c=
%3A/Users/Jack/Desktop/C/test.c"},"position":{"line":0,"character":3}}}
> [jsonrpc] e[21:06:16.438] --> textDocument/signatureHelp[5] {"jsonrpc":"2=
.0","id":5,"method":"textDocument/signatureHelp","params":{"textDocument":{=
"uri":"file:///c%3A/Users/Jack/Desktop/C/test.c"},"position":{"line":0,"cha=
racter":3}}}
> [jsonrpc] e[21:06:16.440] <-- textDocument/codeAction[2] {"error":{"code"=
:-32602,"message":"trying to get AST for non-added document"},"id":2,"jsonr=
pc":"2.0"}
> [jsonrpc] e[21:06:16.440] <-- textDocument/documentHighlight[3] {"error":=
{"code":-32602,"message":"trying to get AST for non-added document"},"id":3=
,"jsonrpc":"2.0"}
> [jsonrpc] e[21:06:16.440] <-- textDocument/hover[4] {"error":{"code":-326=
02,"message":"trying to get AST for non-added document"},"id":4,"jsonrpc":"=
2.0"}
> [jsonrpc] e[21:06:16.440] <-- textDocument/signatureHelp[5] {"error":{"co=
de":-32602,"message":"trying to get preamble for non-added document"},"id":=
5,"jsonrpc":"2.0"}
> [stderr] I[21:06:16.438] <-- textDocument/codeAction(2)
> [stderr] I[21:06:16.438] --> reply:textDocument/codeAction(2) 0 ms, erro=
r: -32602: trying to get AST for non-added document
> [stderr] I[21:06:16.438] <-- textDocument/documentHighlight(3)
> [stderr] I[21:06:16.438] --> reply:textDocument/documentHighlight(3) 0 m=
s, error: -32602: trying to get AST for non-added document
> [stderr] I[21:06:16.438] <-- textDocument/hover(4)
> [stderr] I[21:06:16.438] --> reply:textDocument/hover(4) 0 ms, error: -3=
2602: trying to get AST for non-added document
> [stderr] I[21:06:16.438] <-- textDocument/signatureHelp(5)
> [stderr] I[21:06:16.438] --> reply:textDocument/signatureHelp(5) 0 ms, e=
rror: -32602: trying to get preamble for non-added document
> [jsonrpc] e[21:06:24.039] --> textDocument/codeAction[6] {"jsonrpc":"2.0"=
,"id":6,"method":"textDocument/codeAction","params":{"textDocument":{"uri":=
"file:///c%3A/Users/Jack/Desktop/C/test.c"},"range":{"start":{"line":0,"cha=
racter":0},"end":{"line":3,"character":0}},"context":{"diagnostics":[],"tri=
ggerKind":2}}}
> [jsonrpc] e[21:06:24.039] --> textDocument/documentHighlight[7] {"jsonrpc=
":"2.0","id":7,"method":"textDocument/documentHighlight","params":{"textDoc=
ument":{"uri":"file:///c%3A/Users/Jack/Desktop/C/test.c"},"position":{"line=
":0,"character":3}}}
> [jsonrpc] e[21:06:24.039] --> textDocument/hover[8] {"jsonrpc":"2.0","id"=
:8,"method":"textDocument/hover","params":{"textDocument":{"uri":"file:///c=
%3A/Users/Jack/Desktop/C/test.c"},"position":{"line":0,"character":3}}}
> [jsonrpc] e[21:06:24.039] --> textDocument/signatureHelp[9] {"jsonrpc":"2=
.0","id":9,"method":"textDocument/signatureHelp","params":{"textDocument":{=
"uri":"file:///c%3A/Users/Jack/Desktop/C/test.c"},"position":{"line":0,"cha=
racter":3}}}
> [jsonrpc] e[21:06:24.060] <-- textDocument/codeAction[6] {"error":{"code"=
:-32602,"message":"trying to get AST for non-added document"},"id":6,"jsonr=
pc":"2.0"}
> [jsonrpc] e[21:06:24.060] <-- textDocument/documentHighlight[7] {"error":=
{"code":-32602,"message":"trying to get AST for non-added document"},"id":7=
,"jsonrpc":"2.0"}
> [jsonrpc] e[21:06:24.060] <-- textDocument/hover[8] {"error":{"code":-326=
02,"message":"trying to get AST for non-added document"},"id":8,"jsonrpc":"=
2.0"}
> [jsonrpc] e[21:06:24.060] <-- textDocument/signatureHelp[9] {"error":{"co=
de":-32602,"message":"trying to get preamble for non-added document"},"id":=
9,"jsonrpc":"2.0"}
> [stderr] I[21:06:24.039] <-- textDocument/codeAction(6)
> [stderr] I[21:06:24.039] --> reply:textDocument/codeAction(6) 0 ms, erro=
r: -32602: trying to get AST for non-added document
> [stderr] I[21:06:24.039] <-- textDocument/documentHighlight(7)
> [stderr] I[21:06:24.039] --> reply:textDocument/documentHighlight(7) 0 m=
s, error: -32602: trying to get AST for non-added document
> [stderr] I[21:06:24.039] <-- textDocument/hover(8)
> [stderr] I[21:06:24.039] --> reply:textDocument/hover(8) 0 ms, error: -3=
2602: trying to get AST for non-added document
> [stderr] I[21:06:24.039] <-- textDocument/signatureHelp(9)
> [stderr] I[21:06:24.039] --> reply:textDocument/signatureHelp(9) 0 ms, e=
rror: -32602: trying to get preamble for non-added document
> [jsonrpc] e[21:06:33.885] --> textDocument/codeAction[10] {"jsonrpc":"2.0=
","id":10,"method":"textDocument/codeAction","params":{"textDocument":{"uri=
":"file:///c%3A/Users/Jack/Desktop/C/test.c"},"range":{"start":{"line":0,"c=
haracter":0},"end":{"line":3,"character":0}},"context":{"diagnostics":[],"t=
riggerKind":2}}}
> [jsonrpc] e[21:06:33.885] --> textDocument/documentHighlight[11] {"jsonrp=
c":"2.0","id":11,"method":"textDocument/documentHighlight","params":{"textD=
ocument":{"uri":"file:///c%3A/Users/Jack/Desktop/C/test.c"},"position":{"li=
ne":3,"character":0}}}
> [jsonrpc] e[21:06:33.885] --> textDocument/hover[12] {"jsonrpc":"2.0","id=
":12,"method":"textDocument/hover","params":{"textDocument":{"uri":"file://=
/c%3A/Users/Jack/Desktop/C/test.c"},"position":{"line":3,"character":0}}}
> [jsonrpc] e[21:06:33.885] --> textDocument/signatureHelp[13] {"jsonrpc":"=
2.0","id":13,"method":"textDocument/signatureHelp","params":{"textDocument"=
:{"uri":"file:///c%3A/Users/Jack/Desktop/C/test.c"},"position":{"line":3,"c=
haracter":0}}}
> [jsonrpc] e[21:06:33.923] <-- textDocument/codeAction[10] {"error":{"code=
":-32602,"message":"trying to get AST for non-added document"},"id":10,"jso=
nrpc":"2.0"}
> [jsonrpc] e[21:06:33.923] <-- textDocument/documentHighlight[11] {"error"=
:{"code":-32602,"message":"trying to get AST for non-added document"},"id":=
11,"jsonrpc":"2.0"}
> [jsonrpc] e[21:06:33.923] <-- textDocument/hover[12] {"error":{"code":-32=
602,"message":"trying to get AST for non-added document"},"id":12,"jsonrpc"=
:"2.0"}
> [jsonrpc] e[21:06:33.923] <-- textDocument/signatureHelp[13] {"error":{"c=
ode":-32602,"message":"trying to get preamble for non-added document"},"id"=
:13,"jsonrpc":"2.0"}
> [stderr] I[21:06:33.885] <-- textDocument/codeAction(10)
> [stderr] I[21:06:33.885] --> reply:textDocument/codeAction(10) 0 ms, err=
or: -32602: trying to get AST for non-added document
> [stderr] I[21:06:33.885] <-- textDocument/documentHighlight(11)
> [stderr] I[21:06:33.885] --> reply:textDocument/documentHighlight(11) 0 =
ms, error: -32602: trying to get AST for non-added document
> [stderr] I[21:06:33.885] <-- textDocument/hover(12)
> [stderr] I[21:06:33.885] --> reply:textDocument/hover(12) 0 ms, error: -=
32602: trying to get AST for non-added document
> [stderr] I[21:06:33.885] <-- textDocument/signatureHelp(13)
> [stderr] I[21:06:33.885] --> reply:textDocument/signatureHelp(13) 0 ms, =
error: -32602: trying to get preamble for non-added document
>=20
> ```
>=20
> So, I think the problem might be caused by jsonrpc.el????
I think Eglot should filter the stuff it sends to remove non-Unicode
characters. jsonrpc.el is too low-level to do that. Let's hear what
Joao thinks about this.
bug-gnu-emacs@HIDDEN:bug#79682; Package emacs.
Full text available.Received: (at 79682) by debbugs.gnu.org; 23 Oct 2025 08:31:34 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 23 04:31:34 2025 Received: from localhost ([127.0.0.1]:59745 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vBqjO-0007fy-10 for submit <at> debbugs.gnu.org; Thu, 23 Oct 2025 04:31:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35538) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1vBqjK-0007fb-4b for 79682 <at> debbugs.gnu.org; Thu, 23 Oct 2025 04:31:31 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1vBqjE-0000J5-9U; Thu, 23 Oct 2025 04:31:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=rc1+9wDC8pjaCjU2XrHJZ6QkXXKPpoFhH5yixn+AHGc=; b=ErY/1+M8LC0xLkyq4C/V js3NKizA78DjcM9RhhnSCpXuEGlF9gUYMxwxiJwO+W5wBsFPxH9NwWrPofvBKCdf5t2p/t3WUeYhi gkx3UHSvhJ3EvkTaJM3+BNuhSX4WmIi85oUEVK0eHjW2+4f/5SR7NGfB9cjPzW6OFJFJT7oV85Ws2 +G5fzYdZsyo+QdhRdQv4HyHDwC5ybu9HzkXJpB/MFUrXQEh1KOSywGcCXtna5kTEurFkodIfwp7HF 7kkVUjHaFxGxxioUA5FMKltjrpZiVaVF/3+D00qttCvyTET5zcusH9wDt4rroWQAMMuURFtkdlbQ5 v13CTCilUPRsmw==; Date: Thu, 23 Oct 2025 11:31:19 +0300 Message-Id: <86347auii0.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: ISouthRain <isouthrain@HIDDEN>, joaotavora@HIDDEN In-Reply-To: <87frba6rhn.fsf@HIDDEN> (message from ISouthRain on Thu, 23 Oct 2025 14:51:00 +0800) Subject: Re: bug#79682: 31.0.50; Eglot does not support buffers containing special characters. References: <87frba6rhn.fsf@HIDDEN> MIME-version: 1.0 Content-type: text/plain; charset=gbk Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79682 Cc: 79682 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > From: ISouthRain <isouthrain@HIDDEN> > Date: Thu, 23 Oct 2025 14:51:00 +0800 > > > ά»¤Õß, ÄãÃǺÃ!! > ÇëÔÁÂÎÒʹÓÃÎÒµÄĸÓï¶ø²»ÊÇ English À´·´À¡Õâ¸öÎÊÌâ. > ÎÒ·¢ÏÖÁËÒ»¸öÎÊÌâ, ÓйØÓÚ eglot Æô¶¯Ê§°ÜµÄÎÊÌâ. > Èç¹û buffer ÄÚÈÝ´æÔÚ ÌØÊâ×Ö·û, ÄÇô eglot Æô¶¯Ê§°Ü. > ÔÚ cc-mode ʹÓà eglot Æô¶¯ clangd. > ±ÈÈç buffer ÄÚÈÝ´æÔÚ: > ```C > // Return: £t true--OK false--Error > ``` > ÎÒ²»È·¶¨·¢Ë͵½ÄãÄDZߵÄÓʼþÕâ¸öÌØÊâ±àÂëÊÇ·ñ´æÔÚ, ËüÊÇ: > \5414622 > > ÒòΪÎÒ»áÔÚ Emacs Íⲿ±à¼Æ÷±à¼Îļþ, ËùÒÔÓпÉÄܲúÉúÕâ¸ö ÌØÊâ×Ö·û. > ËùÒÔÎÒÏë¿´¿´ÕâÊÇ·ñºÏÀí. > > ¸ÐлÄãÃǵŤ×÷, ÕæµÄ!! Translation to English: > Hello maintainers!! > Please forgive me for reporting this issue in my native language instead of English. > I've discovered an issue with eglot failing to start. > If the buffer contains special characters, eglot will fail to start. > Use eglot in cc-mode to start clangd. > For example, if the buffer contains: > ```C > // Return: £t true--OK false--Error > ``` > I'm not sure if the special encoding used in the email sent to you is: > \5414622 > > Because I edit files in an editor outside of Emacs, this special character might be present. > So I wanted to see if this is reasonable. > > Thanks for your work, really! That character (0x161992) is beyond the last character supported by Unicode, which is 0x10ffff. I suspect that the LSP you are using cannot cope with non-Unicode characters. But maybe Eglot could somehow ignore it or translate it to some acceptable string? Can you show what does "eglot will fail to start" really mean? Do you see some error message or something? Joao, any suggestions?
bug-gnu-emacs@HIDDEN:bug#79682; Package emacs.
Full text available.Received: (at submit) by debbugs.gnu.org; 23 Oct 2025 07:08:22 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 23 03:08:22 2025 Received: from localhost ([127.0.0.1]:59509 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vBpQr-0002p7-DX for submit <at> debbugs.gnu.org; Thu, 23 Oct 2025 03:08:22 -0400 Received: from lists.gnu.org ([2001:470:142::17]:32784) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <isouthrain@HIDDEN>) id 1vBpAX-00021B-2b for submit <at> debbugs.gnu.org; Thu, 23 Oct 2025 02:51:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <isouthrain@HIDDEN>) id 1vBpAR-0000w4-IV for bug-gnu-emacs@HIDDEN; Thu, 23 Oct 2025 02:51:23 -0400 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <isouthrain@HIDDEN>) id 1vBpAP-0003Kq-34 for bug-gnu-emacs@HIDDEN; Thu, 23 Oct 2025 02:51:23 -0400 Received: by mail-pf1-x443.google.com with SMTP id d2e1a72fcca58-79af647cef2so435291b3a.3 for <bug-gnu-emacs@HIDDEN>; Wed, 22 Oct 2025 23:51:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761202279; x=1761807079; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=7QkhNbi+3d1MF78J8fdD6WnIWvWhBle054a+iJDtpcw=; b=UVTiDZa/T5U+ViNL0Z33tMjR9fysYsZb0HF7xGf07Z3TWOZ4rIS4B+XeBn3B+QGAmT ou+gJN98yt6ACMnKnK/kLAqpfnwLwuSEeElbYuug6pkHE8OAhBCVzKU/u8vAMTi3tpko snhAfE3M76u/M1jLvM2pODwpjMnqoKjhGzvlJ8TutSAklWxy4d8UtfYH0ATBp2UUlmup P8hHJh/SQiYbeHI9LqkGXoDDWsINyMEUBeuAuT0+rgRRzeq6hKUgHsH+o0Vm+IRteXsF r6N16asz8o2bmWJTU5CL1EjbdtgJnD5gZd7qc2ahzzZFZ4y2Qs3dZwdNsagdNLlTwDny wL2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761202279; x=1761807079; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=7QkhNbi+3d1MF78J8fdD6WnIWvWhBle054a+iJDtpcw=; b=FRPPjk4JrVUC2XIykylNF1lryJjcxaBISYd16ratYDCVUFgwp7U9QxYbPsTsmfkVg1 7xafsnSQI67jB4nrWxfQvBGCPBWJUlB81wMuCYUZVQff5TGPLdZJ+ZJCCzuC1IIT86Yt Aqm0NHWtsgLV8zujjscYFDVjQS6aqza0QWawFQbwMXyW/LEqRZxGXb82kIvmZcGatfda UNVNVc6FgARHC0htGiPjIHkLAAepRaLc2P8whXyZ9ZcrlwOCaxOh3/cqc2sY4RLKpBb9 a5Bs8lEdj51at+umJA9pZ/lqDKpXMZL9uN3DNta77nD7sot4JJmAiQKSe8W9uL9uVYXM p4ig== X-Gm-Message-State: AOJu0YxmtOBSzmflmVgXX8I5IEz3x2sKtbc2HHlE8LWSkRPaS+DOVFhQ kMtN1WyC1Yw4JCErHTovhJgoiFMReQ1K6+B1nN/xptqAVVZQ4kQMgUf5QWMYTmra X-Gm-Gg: ASbGnctC2qpowL/CcYxBN1Z0qecUo/SM4+IeqS9cE7fjtSmchjFD3Mbfaao0ZLEFmgb dNy6XQegT0nxTJwMgUMHGvETZpyuh830d8GP/2GxCOFLHNQrD0602Y0cg4MV5xzUnFcSyXYjTbg XtTdsoEwuu/wIzVw1c0NJC9RqrYGCLrAlNRKN8OFibdqS0/L06CZOamgP2zVNK2Ww7mC8tIL9rI RrQdnclHjzP+wm3Yvg/LVgnbIBm3xmpxNc8357ZtPqzpbq6UYQjd2Q2/BDuQxS6HHaAy9Q6lcqd 37PhsSFNYVTnCh4mVtp4AT7aRcai5bojtvazp+Yi+DI0TFMpucoepvTFwCJ/LLoIGop7CPuQPVA 589ML/NZSkHaEo8DI7A7fTci683MSAEYq1TMsFbD/bSsOkzcreqfnUkRUJ25xbpm1l38A2epJ5G pgRa7hrcc40wIqv3ci9jiGJ4g4SjEUXbcqU7Y= X-Google-Smtp-Source: AGHT+IEsLfNauL+oOcb/tdEfIJqOzXpu4UNUDczeWWDE5bZky6jV80S/5H+kkRxrQGTA+9X0OYsJkA== X-Received: by 2002:a05:6a21:3994:b0:334:a8b8:3ce5 with SMTP id adf61e73a8af0-334a8b83ee1mr32616096637.28.1761202278785; Wed, 22 Oct 2025 23:51:18 -0700 (PDT) Received: from adminuirs-PC ([157.122.145.134]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7a274b8b259sm1406633b3a.36.2025.10.22.23.51.16 for <bug-gnu-emacs@HIDDEN> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Oct 2025 23:51:18 -0700 (PDT) From: ISouthRain <isouthrain@HIDDEN> To: bug-gnu-emacs@HIDDEN Subject: 31.0.50; Eglot does not support buffers containing special characters. X-Debbugs-Cc: Date: Thu, 23 Oct 2025 14:51:00 +0800 Message-ID: <87frba6rhn.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=gbk Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::443; envelope-from=isouthrain@HIDDEN; helo=mail-pf1-x443.google.com X-Spam_score_int: 4 X-Spam_score: 0.4 X-Spam_bar: / X-Spam_report: (0.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, MIME_CHARSET_FARAWAY=2.45, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 23 Oct 2025 03:08:20 -0400 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.0 (/) =CE=AC=BB=A4=D5=DF, =C4=E3=C3=C7=BA=C3!! =C7=EB=D4=AD=C1=C2=CE=D2=CA=B9=D3=C3=CE=D2=B5=C4=C4=B8=D3=EF=B6=F8=B2=BB=CA= =C7 English =C0=B4=B7=B4=C0=A1=D5=E2=B8=F6=CE=CA=CC=E2. =CE=D2=B7=A2=CF=D6=C1=CB=D2=BB=B8=F6=CE=CA=CC=E2, =D3=D0=B9=D8=D3=DA eglot = =C6=F4=B6=AF=CA=A7=B0=DC=B5=C4=CE=CA=CC=E2. =C8=E7=B9=FB buffer =C4=DA=C8=DD=B4=E6=D4=DA =CC=D8=CA=E2=D7=D6=B7=FB, =C4= =C7=C3=B4 eglot =C6=F4=B6=AF=CA=A7=B0=DC. =D4=DA cc-mode =CA=B9=D3=C3 eglot =C6=F4=B6=AF clangd. =B1=C8=C8=E7 buffer =C4=DA=C8=DD=B4=E6=D4=DA: ```C // Return: =A3t true--OK false--Error ``` =CE=D2=B2=BB=C8=B7=B6=A8=B7=A2=CB=CD=B5=BD=C4=E3=C4=C7=B1=DF=B5=C4=D3=CA=BC= =FE=D5=E2=B8=F6=CC=D8=CA=E2=B1=E0=C2=EB=CA=C7=B7=F1=B4=E6=D4=DA, =CB=FC=CA= =C7: \5414622 =D2=F2=CE=AA=CE=D2=BB=E1=D4=DA Emacs =CD=E2=B2=BF=B1=E0=BC=AD=C6=F7=B1=E0= =BC=AD=CE=C4=BC=FE, =CB=F9=D2=D4=D3=D0=BF=C9=C4=DC=B2=FA=C9=FA=D5=E2=B8=F6 = =CC=D8=CA=E2=D7=D6=B7=FB. =CB=F9=D2=D4=CE=D2=CF=EB=BF=B4=BF=B4=D5=E2=CA=C7=B7=F1=BA=CF=C0=ED. =B8=D0=D0=BB=C4=E3=C3=C7=B5=C4=B9=A4=D7=F7, =D5=E6=B5=C4!! In GNU Emacs 31.0.50 (build 1, x86_64-w64-mingw32) of 2025-09-05 built on runnervmp943j Repository revision: 8589735be509190060f82398da69cf6d9d659434 Repository branch: HEAD Windowing system distributor 'Microsoft Corp.', version 10.0.19045 System Description: Microsoft Windows 10 Enterprise (v10.0.2009.19045.3324) Configured using: 'configure --prefix=3D/d/a/emacs-build/emacs-build/pkg/8589735-ucrt-x86_64 'CFLAGS=3D-O2 -fno-semantic-interposition -floop-parallelize-all -ftree-parallelize-loops=3D4 -g -pipe ' --disable-build-details --without-dbus --enable-build-details --with-compress-install --with-cairo --with-gif --with-gnutls --with-harfbuzz --with-jpeg --with-json --with-lcms2 --with-mps --with-native-compilation --with-png --with-rsvg --with-tiff --with-tree-sitter --with-xml2 --with-xpm --with-zlib' Configured features: ACL GIF GMP GNUTLS HARFBUZZ JPEG LCMS2 LIBXML2 MODULES MPS NATIVE_COMP NOTIFY W32NOTIFY PDUMPER PNG RSVG SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XPM ZLIB Important settings: value of $LANG: CHS locale-coding-system: cp936 Major mode: C// Minor modes in effect: treesit-fold-mode: t eglot-tempel-mode: t eglot-inactive-regions-mode: t eglot-booster-mode: t eglot--managed-mode: t flymake-mode: t gptel-watch-mode: t annotate-mode: t subword-mode: t which-function-mode: t server-mode: t auto-image-file-mode: t global-dict-line-mode: t dict-line-mode: t which-key-mode: t winner-mode: t indent-bars-mode: t rainbow-delimiters-mode: t eldoc-box-hover-mode: t display-time-mode: t global-auto-revert-mode: t save-place-mode: t recentf-mode: t global-hl-line-mode: t global-whitespace-mode: t whitespace-mode: t savehist-mode: t electric-pair-mode: t pixel-scroll-precision-mode: t empx-mode: t vertico-mode: t marginalia-mode: t undo-fu-session-global-mode: t undo-fu-session-mode: t super-save-mode: t global-hl-todo-mode: t hl-todo-mode: t global-page-break-lines-mode: t page-break-lines-mode: t dape-breakpoint-global-mode: t dape-many-windows: t hexl-follow-ascii: t repeat-mode: t term-keys-mode: t corfu-history-mode: t corfu-popupinfo-mode: t global-corfu-mode: t corfu-mode: t global-display-fill-column-indicator-mode: t display-fill-column-indicator-mode: t elpaca-use-package-mode: t override-global-mode: t elpaca-no-symlink-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t window-divider-mode: t minibuffer-regexp-mode: t column-number-mode: t line-number-mode: t global-visual-line-mode: t visual-line-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: c:/Users/adminuirs/AppData/Roaming/.emacs.d/elpaca/builds/transient/transie= nt hides f:/App/emacs/share/emacs/31.0.50/lisp/transient Features: (shadow sort mail-extr consult-imenu emacsbug lisp-mnt vertico-directory consult-xref markdown-mode treesit-fold treesit-fold-summary treesit-fold-parsers treesit-fold-util c++-ts-mode c-ts-mode c-ts-common eglot-tempel peg eglot-inactive-regions eglot-booster eglot external-completion diff ert ewoc flymake gptel-watch gptel-rewrite gptel-transient gptel-gemini gptel-org gptel-prompter gptel gptel-openai annotate ibuffer ibuffer-loaddefs consult bookmark undo-fu string-inflection tabify ffap ispell vc-git diff-mode vc-dispatcher org-appear oc-basic bibtex expreg cap-words superword subword tempel-collection tempel ace-window avy posframe jka-compr vertico-sort helpful cc-langs trace cl-print edebug debug backtrace info-look info f help-fns radix-tree elisp-refs dash add-log which-func imenu server org-protocol-capture-html eww track-changes vtable mule-util url-queue mm-url gnus-demon image-file image-converter gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime dig nntp gnus-cache gnus-sum shr pixel-fill kinsoku url-file svg dom gnus-group gnus-undo gnus-start gnus-dbus dbus xml gnus-cloud nnimap nnmail browse-url mail-source utf7 nnoo gnus-spec gnus-int gnus-range message sendmail yank-media dired dired-loaddefs rfc822 mml mml-sec epa epg rfc6068 epg-config mm-decode mm-bodies mm-encode mailabbrev gmm-utils mailheader gnus-win gnus nnheader gnus-util range s org-protocol org-capture dict-line org-limit-image-size which-key winner indent-bars rainbow-delimiters eldoc-box time autorevert filenotify saveplace tramp-cache time-stamp tramp-sh recentf tree-widget hl-line whitespace savehist elec-pair pixel-scroll cua-base empx xref vertico marginalia undo-fu-session super-save hl-todo diminish page-break-lines dape jsonrpc tramp trampver tramp-integration files-x tramp-message tramp-compat tramp-loaddefs hexl gdb-mi bindat gud compile text-property-search repeat pulse face-remap color term-keys transient corfu-history corfu-popupinfo corfu pinyinlib orderless modus-operandi-tinted-theme modus-themes derived cal-julian theme-changer solar cal-dst term-keys-autoloads copilot-autoloads eca-autoloads gptel-autoloads emms-autoloads ement-autoloads persist-autoloads plz-autoloads taxy-magit-section-autoloads taxy-autoloads svg-lib-autoloads visual-fill-column-autoloads crdt-autoloads string-inflection-autoloads markdown-toc-autoloads annotate-autoloads eglot-tempel-autoloads tempel-collection-autoloads tempel-autoloads cargo-autoloads markdown-mode-autoloads rust-mode-autoloads eglot-inactive-regions-autoloads eglot-booster-autoloads eldoc-box-autoloads indent-bars-autoloads treesit-fold-autoloads dape-autoloads page-break-lines-autoloads pyim-basedict-autoloads pyim-autoloads async-autoloads xr-autoloads posframe-autoloads magit-autoloads with-editor-autoloads transient-autoloads flyspell-correct-avy-menu-autoloads avy-menu-autoloads flyspell-correct-autoloads google-translate-autoloads popup-autoloads corfu-english-helper-autoloads corfu-autoloads ace-window-autoloads avy-autoloads expreg-autoloads rainbow-delimiters-autoloads super-save-autoloads undo-fu-session-autoloads undo-fu-autoloads deadgrep-autoloads spinner-autoloads org-appear-autoloads ox-pandoc-autoloads ht-autoloads org-cliplink-autoloads org-roam-autoloads emacsql-autoloads magit-section-autoloads cond-let-autoloads llama-autoloads ox-hugo-autoloads tomelr-autoloads org-protocol-capture-html-autoloads embark-consult-autoloads embark-autoloads marginalia-autoloads consult-todo-autoloads hl-todo-autoloads consult-autoloads pinyinlib-autoloads orderless-autoloads vertico-autoloads helpful-autoloads f-autoloads elisp-refs-autoloads dash-autoloads s-autoloads theme-changer-autoloads diminish-autoloads parse-time iso8601 mail-utils gnutls network-stream url-http mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr url-gw nsm puny url-cache url-auth elpaca-menu-melpa elpaca-menu-org ob-latex ob-python python compat pcase ob-shell shell ob-C cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs ox-odt rng-loc rng-uri rng-parse rng-match rng-dt rng-util rng-pttrn nxml-parse nxml-ns nxml-enc xmltok nxml-util ox-latex ox-icalendar org-agenda ox-html table ox-ascii ox-publish ox org-attach org-element org-persist xdg org-id org-refile org-element-ast inline avl-tree generator org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-src sh-script smie treesit executable ob-comint org-pcomplete pcomplete comint ansi-osc ansi-color ring org-list org-footnote org-faces org-entities time-date noutline outline ob-emacs-lisp ob-core ob-eval org-cycle org-table ol org-fold org-fold-core org-keys oc org-loaddefs thingatpt find-func cal-menu calendar cal-loaddefs org-version org-compat org-macs format-spec project edmacro kmacro display-fill-column-indicator comp comp-cstr warnings comp-run comp-common rx cus-edit pp cus-start cus-load wid-edit cl-extra help-mode elpaca-use-package use-package use-package-ensure use-package-delight use-package-diminish use-package-bind-key bind-key easy-mmode use-package-core elpaca-use-package-autoloads elpaca-log elpaca-ui url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util url-parse auth-source eieio eieio-core cl-macs icons password-cache json subr-x map byte-opt gv bytecomp byte-compile url-vars mailcap cl-seq elpaca elpaca-process cl-loaddefs cl-lib elpaca-autoloads china-util rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel touch-screen dos-w32 ls-lisp term/w32-nt disp-table term/w32-win w32-win w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads w32notify w32 lcms2 multi-tty move-toolbar make-network-process tty-child-frames native-compile mps emacs) Memory information: ((conses 24 0 0) (symbols 56 0 0) (strings 40 0 0) (string-bytes 1 0) (vectors 24 0) (vector-slots 8 0 0) (floats 24 0 0) (intervals 64 0 0) (buffers 1072 0))
ISouthRain <isouthrain@HIDDEN>:bug-gnu-emacs@HIDDEN.
Full text available.bug-gnu-emacs@HIDDEN:bug#79682; Package emacs.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.