From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [192.168.2.1] (port=16010 helo=steel) by systemreboot.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mWOgC-0000gQ-Nl; Sat, 02 Oct 2021 01:28:48 +0530 From: Arun Isaac To: Mathieu Othacehe Cc: guile-email@systemreboot.net Subject: Re: Fix tests with Guile 3.0.7 In-Reply-To: <87mtnv1r2p.fsf@gnu.org> References: <87mtnv1r2p.fsf@gnu.org> Date: Sat, 02 Oct 2021 01:28:43 +0530 Message-ID: <87lf3cjz4c.fsf@systemreboot.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" List-Id: --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Hi Mathieu, Thanks for figuring this out! Instead of the unit length bytevector with an 'e' character, can we just use a unit length bytevector with the null character? That would be less surprising to the reader. WDYT? See attached patch. Regards, Arun --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-email-Do-not-use-an-empty-bytevector-to-test-the-cha.patch Content-Transfer-Encoding: quoted-printable From=202f58690d2489a5bbacef77cf6a9143aae464e54a Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Wed, 29 Sep 2021 12:47:35 +0000 Subject: [PATCH] email: Do not use an empty bytevector to test the charset. Using an empty bytevector no longer throws an exception since Guile commit 5ea8c69e9153a970952bf6f0b32c4fad6a28e839. * email/email.scm (post-process-content-transfer-encoding): Use a bytevector of unit length to test the charset validity. Signed-off-by: Arun Isaac =2D-- email/email.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/email/email.scm b/email/email.scm index 3f4e194..fc1564e 100644 =2D-- a/email/email.scm +++ b/email/email.scm @@ -832,7 +832,7 @@ values. The returned headers is a string and body is a = bytevector." (define (valid-charset? charset) (catch #t (lambda () =2D (bytevector->string (make-bytevector 0 0) charset) + (bytevector->string (make-bytevector 1 0) charset) #t) (const #f))) =20 =2D-=20 2.33.0 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFPBAEBCAA5FiEEf3MDQ/Lwnzx3v3nTLiXui2GAK7MFAmFXaHMbHGFydW5pc2Fh Y0BzeXN0ZW1yZWJvb3QubmV0AAoJEC4l7othgCuzdwIIAJzIGmPyRSCTkWQKnGgX es17gZ0QFYbeiNHwB0ernbWPcMud93sgPocOLENIHfknXLKpSk05KTXwIWdKPPVR dIrt8d9983lCd+1DajaNdBJoZPwktK2fPfIHrE8RfBQ+8XK/KhZZb4OLlcleDi9f bXS8K9zEkNJ1sbV+09lJkHWRgH2bvZ3dQIPrRJ4DpxkgMrAnXz3YgAvwAlTk9mWi nQrUBPCg0xAltDxXkixa2KTYdL4o/Xct5w1+ECeT/b/kS/wCInv1ezmJArU0v4LY URM10VC703twnhOCRH4XT6F1aE+/UZNaPfqg1V8woyxiYMOA+a0fFkuTfvBhHdkK yaM= =V3Kn -----END PGP SIGNATURE----- --==-=-=--