Bug 2240460 - terminal uses ISO-8859-1 despite locale specifying UTF-8
Summary: terminal uses ISO-8859-1 despite locale specifying UTF-8
Keywords:
Status: CLOSED DUPLICATE of bug 2240458
Alias: None
Product: Fedora
Classification: Fedora
Component: rxvt-unicode
Version: 39
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: David Cantrell
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-09-24 15:48 UTC by Karsten Kretschmer
Modified: 2023-10-06 06:28 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2023-10-06 06:28:37 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Karsten Kretschmer 2023-09-24 15:48:14 UTC
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)

Comment 1 Karsten Kretschmer 2023-09-24 16:49:27 UTC
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

Comment 2 Dennis Brendel 2023-10-06 06:28:37 UTC
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 ***


Note You need to log in before you can comment on or make changes to this bug.