Bug 1718934 - utf8 characters are not displayed properly
Summary: utf8 characters are not displayed properly
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: xterm
Version: 31
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tomas Korbar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-06-10 14:49 UTC by Lukas Slebodnik
Modified: 2020-11-24 18:53 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-24 18:53:09 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Lukas Slebodnik 2019-06-10 14:49:56 UTC
Description of problem:
I upgrade bunch of packages on rawhide (including glibc and xterm)
I hit a glibc BZ1716710 and characters were not displayed properly even though
I used fixed version of glibc.

Later, I realized that it happens just in xterm. characters are displayed as expected with /dev/tty2 or with xfce4-terminal


Version-Release number of selected component (if applicable):
sh$  rpm -q glibc xterm
glibc-2.29.9000-26.fc31.x86_64
xterm-346-1.fc31.x86_64

How reproducible:
Reproducible on my machine. (I did not try to reproduce im VM)

Steps to Reproduce:
1. # run xterm
2. locale
3.rpm -q --changelog xterm | head

Actual results:
sh-5.0$ locale
LANG=C.utf8
LC_CTYPE="C.utf8"
LC_NUMERIC="C.utf8"
LC_TIME="C.utf8"
LC_COLLATE="C.utf8"
LC_MONETARY="C.utf8"
LC_MESSAGES="C.utf8"
LC_PAPER="C.utf8"
LC_NAME="C.utf8"
LC_ADDRESS="C.utf8"
LC_TELEPHONE="C.utf8"
LC_MEASUREMENT="C.utf8"
LC_IDENTIFICATION="C.utf8"
LC_ALL=
sh-5.0$ rpm -q --changelog openssl | head
* Mon Jun 03 2019 Tomáš Mráz <tmraz> 1.1.1c-3
- add upstream patch to defer sending KeyUpdate after
  pending writes are complete

* Thu May 30 2019 Tomáš Mráz <tmraz> 1.1.1c-2
- fix use of uninitialized memory

* Wed May 29 2019 Tomáš Mráz <tmraz> 1.1.1c-1
- update to the 1.1.1c release

Expected results:
# the same as from tty or from xfce4-terminal
sh-5.0$ locale
LANG=C.utf8
LC_CTYPE="C.utf8"
LC_NUMERIC="C.utf8"
LC_TIME="C.utf8"
LC_COLLATE="C.utf8"
LC_MONETARY="C.utf8"
LC_MESSAGES="C.utf8"
LC_PAPER="C.utf8"
LC_NAME="C.utf8"
LC_ADDRESS="C.utf8"
LC_TELEPHONE="C.utf8"
LC_MEASUREMENT="C.utf8"
LC_IDENTIFICATION="C.utf8"
LC_ALL=
sh-5.0$ rpm -q --changelog openssl | head
* Mon Jun 03 2019 Tomáš Mráz <tmraz> 1.1.1c-3
- add upstream patch to defer sending KeyUpdate after
  pending writes are complete

* Thu May 30 2019 Tomáš Mráz <tmraz> 1.1.1c-2
- fix use of uninitialized memory

* Wed May 29 2019 Tomáš Mráz <tmraz> 1.1.1c-1
- update to the 1.1.1c release

Comment 1 Yanko Kaneti 2019-06-10 15:13:02 UTC
$ LC_ALL=C.utf8 xterm
Warning: locale not supported by Xlib, locale set to C

libX11 would need an alias for C.utf8
it knows about C.UTF-8 -> en_US.UTF-8

Comment 2 Lukas Slebodnik 2019-06-10 15:27:38 UTC
(In reply to Yanko Kaneti from comment #1)
> $ LC_ALL=C.utf8 xterm
> Warning: locale not supported by Xlib, locale set to C
> 

That was the tricky part;
I tested just with exporting LC_ALL in existing xterm.

It works If i start a new xterm.

Comment 3 Ben Cotton 2019-08-13 18:55:01 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to 31.

Comment 4 Tomas Korbar 2019-08-14 11:56:02 UTC
Hi Lukas,
Thanks for reporting this.
Are you still experiencing the issue? I am not able to reproduce it in f31.

Comment 5 Lukas Slebodnik 2019-08-14 12:05:33 UTC
(In reply to Tomas Korbar from comment #4)
> Hi Lukas,
> Thanks for reporting this.
> Are you still experiencing the issue? I am not able to reproduce it in f31.

It is reproducible you just need to create new termial e.g.
LC_ALL=C.utf8 xterm

and then run the command   rpm -q --changelog openssl | head

It works expected with LC_ALL=en_US.utf8 xterm.

But IMHO it is not high priority issue.

Comment 6 Tomas Korbar 2019-08-14 13:59:59 UTC
I too think that it is not a high priority issue. However you ran into this and i think it is a good idea to have alias for C.utf8 in libX11, because it is valid locale name (according to locale -a) and libX11 already has alias for C.UTF-8 so why not C.utf8? I will try to discuss this with libX11s upstream.

Comment 7 Lukas Slebodnik 2019-08-14 14:46:01 UTC
I can confirm it works with 
  LC_ALL=C.UTF-8 xterm

But It would be good to ask glibc developers about locales related changes.

Comment 8 Thomas E. Dickey 2020-03-07 02:01:43 UTC
If you only set LC_ALL in a currently-running xterm, that won't change the encoding that it's using.
In the control-right-mouse menu, there's a selection for "UTF-8 Encoding" (which may be disabled
depending on how it's started -- manual page summarizes).  When the menu entry _is_ enabled,
it's possible to switch back/forth to turn UTF-8 mode off/on, either via the menu, or via an
escape sequence.  I don't see any of that in this report, so it seems that xterm is functioning
properly.

Comment 9 Thomas E. Dickey 2020-03-07 02:09:40 UTC
Whether C.utf8 is "valid" depends on who you ask.  It's never been standardized,
(was proposed for standardization and was rejected) though several platforms recognize it,
and is not documented aside from source-code.

There's some discussion here:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=940626

Comment 10 Ben Cotton 2020-11-03 15:17:47 UTC
This message is a reminder that Fedora 31 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 31 on 2020-11-24.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '31'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 31 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 11 Ben Cotton 2020-11-24 18:53:09 UTC
Fedora 31 changed to end-of-life (EOL) status on 2020-11-24. Fedora 31 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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