GNU bug report logs - #70076
28.3; xml-escape-string parse issue

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: "D. Schmudde" <d@HIDDEN>; Keywords: notabug; Done: Stefan Kangas <stefankangas@HIDDEN>; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 70076-done <at> debbugs.gnu.org:


Received: (at 70076-done) by debbugs.gnu.org; 30 Jun 2024 06:12:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 30 02:12:53 2024
Received: from localhost ([127.0.0.1]:54703 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sNnnw-0002gL-Po
	for submit <at> debbugs.gnu.org; Sun, 30 Jun 2024 02:12:53 -0400
Received: from mail-ed1-f48.google.com ([209.85.208.48]:59734)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1sNnnu-0002g5-Uj
 for 70076-done <at> debbugs.gnu.org; Sun, 30 Jun 2024 02:12:51 -0400
Received: by mail-ed1-f48.google.com with SMTP id
 4fb4d7f45d1cf-57cf8880f95so2312914a12.3
 for <70076-done <at> debbugs.gnu.org>; Sat, 29 Jun 2024 23:12:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1719727905; x=1720332705; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=5friZSD/510Y9wBtGaZNBVsG1lMVHc7bx6mkVFrX0u8=;
 b=HLtGp/hokfBgi51tSH6RZAzkyeBRR55rMDf9Z5LJb2Ja/TuAv2IrubuPjhkvFPtIzu
 jXs5nQ34fLmsQy+lj2zgByEa+1f/gpybbERBD9+TQR3MpdfR66DK2YUDJY1HNxOR0aAz
 +IZBBNVfe6In3R+yBrU2NgQzOpgUt+gtiW2MKTt9rHxIesBk2zRTQn+/j+7yrKU3sdTn
 mG+JgLKRwEKmDhKKhjHqTZB8MfB6Zan6PO6cYcHahNV+cVOVyt6jrVe5oZjmXpDa6cZc
 JAyrz5TBgLGMLsOSv9llfZoUNc74+KoQY+uLP3mVnWYQumKLgXPXCXcSJIBw3ZtzSbcV
 ELyA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1719727905; x=1720332705;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=5friZSD/510Y9wBtGaZNBVsG1lMVHc7bx6mkVFrX0u8=;
 b=hXxwrpCSl2limsAixqb2P19vA6rVZJvOHhJuXWT0xKr6IKly0keG9eyStt1Tt/7rW2
 hQKcGpu/TEEqhs8SeRaOv1ra30GhOx4zrLYInF/S3Gg1KhiFTT1rVtmGUS0WM/V+vxzm
 BZu2mqqVsqV99KcKPY5Ew1LpAmFwX9yCVOQjUT39O696MzJpZymHJR5LPYqmr7CUM7Iu
 Se7ZDWKGugUsO20uHo0J2qu9xNUUjOVoSMt8kXlzy+v29suR8NdinMgSIMf6Q2b4rEWn
 NjI7OMB59yqmQ6kxqMvtqnaBUp8AcVrf2Z2FR1JpD8PlwlehWWTKuDPumjuGORJ1VZOp
 RQqg==
X-Forwarded-Encrypted: i=1;
 AJvYcCWgTpOfrfwQAq41qaNl9RNrCzKQPexSPIY/d9k6/A5uDD06kpdiKLqNC6iaWOKys5RtsXHXkYIGchAAaXQ8m8udDMHKXepf9tSRuw==
X-Gm-Message-State: AOJu0YzL7wBp2JXxZYy7yAkk+9grOH+AZb82UibJbSuIm5qGTmqlWdZH
 iJUinqFgaQA0tKflJDJSdpyvParPhO5nQ5F7WVp2QrjrHALpVsiNzGWUMyNsEH1VMrX+NdhiMEt
 I7QwJfCdTdm5LFttijCnKNwJvwA9vzTGXS8QwBQ==
X-Google-Smtp-Source: AGHT+IGwapvjgiOGJeqyMJQL0icdKdlSM24s9CZRiShv+eE1z2q8q+ZRFJ8vJxfQYJx6AFkcN3whNF/mz42K2d6YVro=
X-Received: by 2002:a05:6402:1e8b:b0:57d:4f47:d9ee with SMTP id
 4fb4d7f45d1cf-587a0919578mr2336319a12.31.1719727905295; Sat, 29 Jun 2024
 23:11:45 -0700 (PDT)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Sat, 29 Jun 2024 23:11:45 -0700
From: Stefan Kangas <stefankangas@HIDDEN>
In-Reply-To: <868r1ybkpt.fsf@HIDDEN> (Eli Zaretskii's message of "Sun, 31 Mar
 2024 16:21:34 +0300")
References: <87h6gp9gte.fsf@HIDDEN> <86il14ews3.fsf@HIDDEN>
 <87cyraaby6.fsf@HIDDEN> <868r1ybkpt.fsf@HIDDEN>
MIME-Version: 1.0
Date: Sat, 29 Jun 2024 23:11:45 -0700
Message-ID: <CADwFkmnLn5Ci-K+Ck6HUdm1Jt3Uc4Oap08xYTmKrgjvARU2_HA@HIDDEN>
Subject: Re: bug#70076: 28.3; xml-escape-string parse issue
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 70076-done
Cc: 70076-done <at> debbugs.gnu.org, public@HIDDEN,
 "D. Schmudde" <d@HIDDEN>
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: "D. Schmudde" <d@HIDDEN>
>> Cc: 70076 <at> debbugs.gnu.org, public@HIDDEN
>> Date: Sun, 31 Mar 2024 13:15:29 +0200
>>
>> Okay, good to know. Thanks for taking a look.
>>
>> Here is some additional context. It occurs when using Elfeed's
>> ~elfeed-export-opml~ on my list of RSS feeds. It seems the library
>> relies on ~xml-escape-string~ to parse each element. It's worth
>> noting that this happens on several feeds, not just the feed for
>> leancrew.com listed below.
>
> OK, but still: how did you get to that point?  Where did the
> problematic string originate from?  Was it something that you typed or
> copy/pasted, or something else?
>
>> I can file a bug with the package maintainers but I wasn't sure if
>> the XML parser was a better place to start.
>
> Yes, I think it is best to start by reporting this to package
> maintainers.

This doesn't seem like a bug in Emacs, and we didn't hear anything in 3
months.  I'm therefore closing this bug.

If this is still an issue, please reply to this email (use "Reply to
all" in your email client) and we can reopen the bug report.




Notification sent to "D. Schmudde" <d@HIDDEN>:
bug acknowledged by developer. Full text available.
Reply sent to Stefan Kangas <stefankangas@HIDDEN>:
You have taken responsibility. Full text available.
Added tag(s) notabug. Request was from Stefan Kangas <stefankangas@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 70076 <at> debbugs.gnu.org:


Received: (at 70076) by debbugs.gnu.org; 31 Mar 2024 13:21:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 31 09:21:49 2024
Received: from localhost ([127.0.0.1]:46788 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rqv88-0006j2-35
	for submit <at> debbugs.gnu.org; Sun, 31 Mar 2024 09:21:49 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:49848)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1rqv85-0006iM-I9
 for 70076 <at> debbugs.gnu.org; Sun, 31 Mar 2024 09:21:46 -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 1rqv7w-0002rZ-0f; Sun, 31 Mar 2024 09:21:36 -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=Eoz6TEBIISrHKsEtrypLld0jHy9+POwasBgPbkwkaNk=; b=BXmk+fioUGvM
 OrCChLaVaOFa2MYmAwhINtnvYDiuepPLg4YY+iz45pg2skj/kkL0zpTheb3y372K8oo0vqdIfZ3Uq
 hAgjn19zFd9ItGebkAup20KYxs0jmlcD7VoJSh24tW3dboKy9ApRuwSDbgsurP/OasyVc5XCB4Rug
 na/AEvlLt06LJ5EdJkvQhgvdCBmUsWsxl+huiH2ImS0TUOIzzZWAafh+NlYBEkqWXf0Pl2dBTsMMu
 zYD/WAgN/ahw2DUJ9FAmmNP+6XQvWy5Cg8WFHcMj27KtLtjOJ2xtR8PMsAnkgCI5VQb4CL/A0xSmU
 gAgg+oabvef3AtVRSe1UyA==;
Date: Sun, 31 Mar 2024 16:21:34 +0300
Message-Id: <868r1ybkpt.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: "D. Schmudde" <d@HIDDEN>
In-Reply-To: <87cyraaby6.fsf@HIDDEN>
Subject: Re: bug#70076: 28.3; xml-escape-string parse issue
References: <87h6gp9gte.fsf@HIDDEN> <86il14ews3.fsf@HIDDEN>
 <87cyraaby6.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 70076
Cc: public@HIDDEN, 70076 <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: "D. Schmudde" <d@HIDDEN>
> Cc: 70076 <at> debbugs.gnu.org, public@HIDDEN
> Date: Sun, 31 Mar 2024 13:15:29 +0200
> 
> Okay, good to know. Thanks for taking a look.
> 
> Here is some additional context. It occurs when using Elfeed's 
> ~elfeed-export-opml~ on my list of RSS feeds. It seems the library 
> relies on ~xml-escape-string~ to parse each element. It's worth 
> noting that this happens on several feeds, not just the feed for 
> leancrew.com listed below.

OK, but still: how did you get to that point?  Where did the
problematic string originate from?  Was it something that you typed or
copy/pasted, or something else?

> I can file a bug with the package maintainers but I wasn't sure if 
> the XML parser was a better place to start.

Yes, I think it is best to start by reporting this to package
maintainers.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70076; Package emacs. Full text available.

Message received at 70076 <at> debbugs.gnu.org:


Received: (at 70076) by debbugs.gnu.org; 31 Mar 2024 11:43:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 31 07:43:37 2024
Received: from localhost ([127.0.0.1]:46739 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rqtb3-0000zG-RO
	for submit <at> debbugs.gnu.org; Sun, 31 Mar 2024 07:43:37 -0400
Received: from mailtransmit05.runbox.com ([2a0c:5a00:149::26]:51544)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <d@HIDDEN>) id 1rqtB9-0005DG-Vu
 for 70076 <at> debbugs.gnu.org; Sun, 31 Mar 2024 07:16:49 -0400
Received: from mailtransmit02.runbox ([10.9.9.162] helo=aibo.runbox.com)
 by mailtransmit05.runbox.com with esmtps (TLS1.2) tls
 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93)
 (envelope-from <d@HIDDEN>)
 id 1rqtB1-00Bv9r-Ca; Sun, 31 Mar 2024 13:16:39 +0200
Received: from [10.9.9.74] (helo=submission03.runbox)
 by mailtransmit02.runbox with esmtp (Exim 4.86_2)
 (envelope-from <d@HIDDEN>)
 id 1rqtB0-0005uf-Vq; Sun, 31 Mar 2024 13:16:39 +0200
Received: by submission03.runbox with esmtpsa [Authenticated ID (687959)]
 (TLS1.2:ECDHE_SECP256R1__RSA_SHA256__AES_256_GCM:256) (Exim 4.93)
 id 1rqtAh-007hDt-AI; Sun, 31 Mar 2024 13:16:19 +0200
References: <87h6gp9gte.fsf@HIDDEN> <86il14ews3.fsf@HIDDEN>
User-agent: mu4e 1.10.7; emacs 28.3
From: "D. Schmudde" <d@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#70076: 28.3; xml-escape-string parse issue
Date: Sun, 31 Mar 2024 13:15:29 +0200
In-reply-to: <86il14ews3.fsf@HIDDEN>
Message-ID: <87cyraaby6.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; format=flowed
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 70076
X-Mailman-Approved-At: Sun, 31 Mar 2024 07:43:32 -0400
Cc: public@HIDDEN, 70076 <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.7 (-)

Okay, good to know. Thanks for taking a look.

Here is some additional context. It occurs when using Elfeed's 
~elfeed-export-opml~ on my list of RSS feeds. It seems the library 
relies on ~xml-escape-string~ to parse each element. It's worth 
noting that this happens on several feeds, not just the feed for 
leancrew.com listed below.

I can file a bug with the package maintainers but I wasn't sure if 
the XML parser was a better place to start. Here is the specific 
backtrace, if it's useful:

Debugger entered--Lisp error: (xml-invalid-character 4194274 11)
  signal(xml-invalid-character (4194274 11))
  xml-escape-string("And now it\342\200\231s all this")
  xml-debug-print-internal((outline ((xmlUrl 
  . "https://leancrew.com/all-this/feed/") (title . "And now 
  it\342\200\231s all this"))) "    ")
  ...

/David

Eli Zaretskii <eliz@HIDDEN> writes:

>> Cc: Protesilaos Stavrou <public@HIDDEN>
>> From: "D. Schmudde" <d@HIDDEN>
>> Date: Fri, 29 Mar 2024 16:44:48 +0100
>>
>> Starting with `emacs -Q`:
>>
>> (require 'xml)
>> (xml-escape-string "And now it\342\200\231s all this")
>>
>> The result is: `xml-escape-string: Invalid XML character: 
>> 4194274,
>> 11`
>>
>> I expect that the string will parse correctly with these escape
>> characters. Or is this expectation wrong?
>
> Your expectation is wrong, AFAIU: you are inserting a unibyte 
> string
> (a string made out of raw bytes) instead of inserting a 
> non-ASCII
> multibyte string, which is what XML expects.
>
> Why did you need to insert those bytes, and where did they come 
> from?


--
w: http://schmud.de
e: d@HIDDEN
t: @dschmudde




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70076; Package emacs. Full text available.

Message received at 70076 <at> debbugs.gnu.org:


Received: (at 70076) by debbugs.gnu.org; 29 Mar 2024 18:08:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 29 14:08:22 2024
Received: from localhost ([127.0.0.1]:43398 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rqGeM-0007Ka-1H
	for submit <at> debbugs.gnu.org; Fri, 29 Mar 2024 14:08:22 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:52384)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1rqGeK-0007KN-Ra
 for 70076 <at> debbugs.gnu.org; Fri, 29 Mar 2024 14:08:21 -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 1rqGeD-0002a0-Im; Fri, 29 Mar 2024 14:08:13 -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=11bhbDX/pLLYMed4ZOi8DEgJB6H2mFX0VNIdWMrjZB0=; b=OuhRoV6AyaEJ
 DHqh8Gcj9I42n+m1jOj24rKp1cPcdj2qRlkgPTBy/DPz19N4e78Ifof+MYRCo5B+oBvbM4wOJgTjY
 0LD4SIULf0o5+S3av3vopYiYKjnBEp9AEivMrsGQCUaQEuc3wrc5hicdItMlY6lStnPRegjcKnP2I
 VrJ38/gHyAoKMUj6YGrGbc442ZtohF2by6ZpKk8sMi73OVpRf1LKmU149+wRD+JE7iJ6bxhtutXwY
 yLcfv6phIxGlWinZKO8k6cw0RSBwTnhrAobvuUyMg14NW+Q6we3E9IR+wpKXWwTVthJJpKpRISjqz
 wsnbYbPQH6fkIOgG0WAYaQ==;
Date: Fri, 29 Mar 2024 21:08:12 +0300
Message-Id: <86il14ews3.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: "D. Schmudde" <d@HIDDEN>
In-Reply-To: <87h6gp9gte.fsf@HIDDEN>
Subject: Re: bug#70076: 28.3; xml-escape-string parse issue
References: <87h6gp9gte.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 70076
Cc: public@HIDDEN, 70076 <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 (---)

> Cc: Protesilaos Stavrou <public@HIDDEN>
> From: "D. Schmudde" <d@HIDDEN>
> Date: Fri, 29 Mar 2024 16:44:48 +0100
> 
> Starting with `emacs -Q`:
> 
> (require 'xml)
> (xml-escape-string "And now it\342\200\231s all this")
> 
> The result is: `xml-escape-string: Invalid XML character: 4194274, 
> 11`
> 
> I expect that the string will parse correctly with these escape 
> characters. Or is this expectation wrong?

Your expectation is wrong, AFAIU: you are inserting a unibyte string
(a string made out of raw bytes) instead of inserting a non-ASCII
multibyte string, which is what XML expects.

Why did you need to insert those bytes, and where did they come from?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#70076; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 29 Mar 2024 16:02:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 29 12:02:15 2024
Received: from localhost ([127.0.0.1]:43237 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rqEgH-00015X-4D
	for submit <at> debbugs.gnu.org; Fri, 29 Mar 2024 12:02:15 -0400
Received: from lists.gnu.org ([2001:470:142::17]:34068)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <d@HIDDEN>) id 1rqEWp-0000Xm-4N
 for submit <at> debbugs.gnu.org; Fri, 29 Mar 2024 11:52:27 -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 <d@HIDDEN>) id 1rqEWi-0003oQ-7J
 for bug-gnu-emacs@HIDDEN; Fri, 29 Mar 2024 11:52:20 -0400
Received: from mailtransmit05.runbox.com ([2a0c:5a00:149::26])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <d@HIDDEN>) id 1rqEWg-00045Q-8Q
 for bug-gnu-emacs@HIDDEN; Fri, 29 Mar 2024 11:52:19 -0400
Received: from mailtransmit02.runbox ([10.9.9.162] helo=aibo.runbox.com)
 by mailtransmit05.runbox.com with esmtps (TLS1.2) tls
 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93)
 (envelope-from <d@HIDDEN>)
 id 1rqEWY-007MNQ-IL; Fri, 29 Mar 2024 16:52:10 +0100
Received: from [10.9.9.73] (helo=submission02.runbox)
 by mailtransmit02.runbox with esmtp (Exim 4.86_2)
 (envelope-from <d@HIDDEN>)
 id 1rqEWY-0007QM-2D; Fri, 29 Mar 2024 16:52:10 +0100
Received: by submission02.runbox with esmtpsa [Authenticated ID (687959)]
 (TLS1.2:ECDHE_SECP256R1__RSA_SHA256__AES_256_GCM:256) (Exim 4.93)
 id 1rqEWM-002Gr4-Jj; Fri, 29 Mar 2024 16:51:58 +0100
User-agent: mu4e 1.10.7; emacs 28.3
From: "D. Schmudde" <d@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 28.3; xml-escape-string parse issue
Date: Fri, 29 Mar 2024 16:44:48 +0100
Message-ID: <87h6gp9gte.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; format=flowed
Received-SPF: pass client-ip=2a0c:5a00:149::26; envelope-from=d@HIDDEN;
 helo=mailtransmit05.runbox.com
X-Spam_score_int: -25
X-Spam_score: -2.6
X-Spam_bar: --
X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7,
 SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.9 (/)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Fri, 29 Mar 2024 12:02:06 -0400
Cc: Protesilaos Stavrou <public@HIDDEN>
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.1 (/)

Starting with `emacs -Q`:

(require 'xml)
(xml-escape-string "And now it\342\200\231s all this")

The result is: `xml-escape-string: Invalid XML character: 4194274, 
11`

I expect that the string will parse correctly with these escape 
characters. Or is this expectation wrong?

In GNU Emacs 28.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 
3.24.33, cairo version 1.16.0)
 of 2023-08-25 built on pop-os
Repository revision: dec958258b133b4c21224c594da433919d852800
Repository branch: emacs-28
System Description: Pop!_OS 22.04 LTS

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ 
JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES 
NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF 
TOOLKIT_SCROLL_BARS
X11 XDBE XIM XPM GTK3 ZLIB
Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix



-- 
w: http://schmud.de
e: d@HIDDEN
t: @dschmudde




Acknowledgement sent to "D. Schmudde" <d@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#70076; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 30 Jun 2024 06:15:01 UTC

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