Bug 28501 - multibyte characters causes displacement in pkcon output
Summary: multibyte characters causes displacement in pkcon output
Alias: None
Product: PackageKit
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Richard Hughes
QA Contact:
Depends on:
Reported: 2010-06-11 06:08 UTC by caramba_bk
Modified: 2018-08-21 15:52 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Description caramba_bk 2010-06-11 06:08:59 UTC
In a UTF-8 locale with translated messages, multibyte characters causes displacement.
This is noticable when running an install or update: For each multibyte character (in the left "box"), the progress bar (in the right "box") moves one step to the left if you compare to a line without any multibyte characters. So depending on the messages, the vertical alignment of progress bar breaks.
Comment 1 Richard Hughes 2010-06-23 02:25:54 UTC
Could you paste an example please? Thanks.
Comment 2 caramba_bk 2010-07-13 00:59:09 UTC
LANG=fi_FI.UTF8 pkcon install liferea
Simuloidaan asennusta         [=========================]         
Käynnistetään              [=========================]         
Suoritetaan                   [=========================]         
Ratkaistaan riippuvuuksia     [=========================]         
Asennetaan                    [=========================]         
Odotetaan tunnistautumista    [=========================]         
Käynnistetään              [=========================]         
Suoritetaan                   [=========================]         
Ratkaistaan riippuvuuksia     [=========================]         
Ladataan paketteja            [=========================]         
Tarkistetaan allekirjoituksia [=========================]         
Testataan muutoksia           [=========================]         
Asennetaan paketteja          [=========================]         
Etsitään ohjelmia           [=========================]         
Haetaan tietoja               [=========================]

It seems to be one step left for each 2 byte character.
Another problem is that often, pkcon messages are drawn above previous text instead of on a new row.
Wouldn't it be easier to use ncurses to take care of all the alignments?
Comment 3 caramba_bk 2010-07-13 08:11:42 UTC
Another problem with current layout method is that if you run pkcon search and pipe stdout to less, the text looks very different from how it would look in a terminal. The details column even gets lost.
Comment 4 Richard Hughes 2010-07-13 08:16:05 UTC
pkcon started out life as a quick hack to test the DBus API. It's kinda evolved into a more general purpose tool, but probably needs some kind of rewrite porting it to something more heavyweight like ncurses. I'm kinda busy with other stuff, but if you want to take on this kind of task I would be willing to help you.
Comment 5 caramba_bk 2010-07-25 03:19:22 UTC
I would like to help, but I don't think I know enough about developing with compiled languages.
Comment 6 Richard Hughes 2018-08-21 15:52:55 UTC
We moved the upstream bugtracker to GitHub a long time ago. If this issue still affects you please re-create the issue here: https://github.com/hughsie/PackageKit/issues
Sorry for the impersonal message, and fingers crossed your issue no longer happens. Thanks.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.