XML::LibXML since 1.63 always returns utf-8 octet when you call $doc->as_xml, which seems to be the correct fix.
- $doc->toString always returns octets
- $doc->actualEncoding returns UTF8 if no document encoding is declared
(unlike $doc->getEncoding, which returns undef)
XML::Atom had a broken test that relies on as_xml always returning UTF-8 flagged string, which makes tests fail. I didn't notice that until recently because my laptop had LibXML 1.62 and hence couldn't reproduce the bug.
Anyway XML::Atom 0.27 now has a proper handling to return UTF-8 octets when you call $feed->as_xml_utf8, and will be available on CPAN shortly.