GNU bug report logs - #55897
[PATCH] bindat (str, strz): Convert to unibyte when packing

Previous Next

Package: emacs;

Reported by: Richard Hansen <rhansen <at> rhansen.org>

Date: Sat, 11 Jun 2022 04:39:01 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Richard Hansen <rhansen <at> rhansen.org>
To: 55897 <at> debbugs.gnu.org
Cc: monnier <at> iro.umontreal.ca
Subject: bug#55897: [PATCH] bindat (str, strz): Convert to unibyte when packing
Date: Sat, 11 Jun 2022 00:38:00 -0400
[Message part 1 (text/plain, inline)]
X-Debbugs-CC: monnier <at> iro.umontreal.ca

Two patches attached:

Patch 1:

    bindat (str, strz): Reject multibyte input strings

    * lisp/emacs-lisp/bindat.el (str) (strz): Signal an error if the user
    attempts to pack a multibyte string.
    * test/lisp/emacs-lisp/bindat-tests.el (str) (strz): Add tests.

Patch 2:

    bindat (str, strz): Convert to unibyte when packing

    * lisp/emacs-lisp/bindat.el (str) (strz): Allow callers to pack a
    multibyte string if it only contains ASCII and `eight-bit' characters.
    * doc/lispref/processes.texi (Bindat Types): Update documentation.
    * test/lisp/emacs-lisp/bindat-tests.el (str) (strz): Update tests.
[0001-bindat-str-strz-Reject-multibyte-input-strings.patch (text/x-patch, attachment)]
[0002-bindat-str-strz-Convert-to-unibyte-when-packing.patch (text/x-patch, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]

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

Previous Next


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