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'