GNU bug report logs -
#79376
[PATCH] [WIP] Fix mm multibyte
Previous Next
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Tags: patch
Hi,
I'm trying to fix an issue in Gnus where some Atom sources (namely
planet.emacslife.com/atom.xml, here) are not rendered correctly.
This seems to be related to multibyte/unibyte buffer. Here is a minimal
exemple to reproduce what I see:
--8<---------------cut here---------------start------------->8---
(defun my/gen-handle ()
(with-current-buffer (get-buffer-create " foo")
(erase-buffer)
(insert "’…")
(list (current-buffer) '("text/html"))))
(defun my/test ()
(let ((handle (my/gen-handle)))
(mm-with-part handle
(buffer-string))))
--8<---------------cut here---------------end--------------->8---
When evaluating (my/test), see that the buffer string content does not
have the correct characters.
I get the behaviour I wanted with the attached patch but I don't know if
this is the way to handle this.
In GNU Emacs 31.0.50 (build 36, x86_64-unknown-openbsd7.7) of 2025-09-03
built on computer
Repository revision: 6762ffca6b387df73b62db1adcec127317328604
Repository branch: mgi/mm-multibyte-wip
Windowing system distributor 'The X.Org Foundation', version 11.0.12101018
System Description: OpenBSD computer 7.7 GENERIC.MP#10 amd64
Configured using:
'configure CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib
MAKEINFO=gmakeinfo --prefix=/home/manuel/emacs
--bindir=/home/manuel/bin --with-x-toolkit=no
--with-toolkit-scroll-bars=no --without-cairo --without-dbus
--without-gconf --without-gsettings --without-compress-install'
[0001-WIP-Fix-mm-multibyte.patch (text/x-patch, attachment)]
[Message part 3 (text/plain, inline)]
--
Manuel Giraud
This bug report was last modified today.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.