Comment 12 for bug 1949271

Revision history for this message
X (zfhdk) wrote :

I may have the same problem. Here is some minimal code to see the bug:

from lxml import html
from lxml import etree
root = html.fragment_fromstring("<p>🐻</p>")
print(etree.tostring(root))

Run it in Python3.9 and Python3.11 I got different results (both with lxml 4.9.2):
(the one from Python3.9 is correct)

% python3.9 test.py
b'<p>&#128059;</p>'

% python3.11 test.py
b'<p>h t m l &gt; </p>'