The terminal interprets data to be printed as encoded in ISO-8859-1 despite the locale setting being a .UTF-8 one. Reproducible: Always Steps to Reproduce: 1.start urxvt256c-ml with a UTF-8 locale, e.g. LC_ALL=en_US.UTF-8 2.echo '\0xbd' echo '\xe2\x82\xac' 3.observe screen output Actual Results: ½ ⬠Expected Results: <empty string> € rxvt-unicode-9.31-4.fc39.x86_64 tested on: - Xwayland (xorg-x11-server-Xwayland-23.2.1-1.fc39.x86_64) - SSH forwarding from a CentOS 9-Stream X11 session (tigervnc-server-minimal-1.13.1-2.el9.x86_64) - Xephyr session within Xwayland (xorg-x11-server-Xephyr-1.20.14-24.fc39.x86_64) - Xvfb (xorg-x11-server-Xvfb-1.20.14-24.fc39.x86_64)
On F38, "/usr/bin/echo -e '\xbd'" also outputs "½" despite this being an invalid UTF-8 sequence (rxvt-unicode-9.31-2.fc38.x86_64, tigervnc-server-minimal-1.13.1-3.fc38.x86_64). $ /usr/bin/echo -e '\xbd' ½ $ /usr/bin/echo -e '\xbd' | iconv -f UTF-8 -t UCS-4BE | hexdump -C iconv: (stdin):1:0: cannot convert $ /usr/bin/echo -e '\xe2\x82\xac' € $ /usr/bin/echo -e '\xe2\x82\xac' | iconv -f UTF-8 -t UCS-4BE | hexdump -C 00000000 00 00 20 ac 00 00 00 0a |.. .....| 00000008
That's a duplicate of #2240458. Upgrading to perl-5.38.0-501 fixes this issue. $ echo $'\0xbd' $ echo $'\xe2\x82\xac' € *** This bug has been marked as a duplicate of bug 2240458 ***