konsole problems with utf8 characters

Duncan 1i5t5.duncan at cox.net
Sun Jan 8 15:54:20 GMT 2023


Walter Cazzola posted on Wed, 4 Jan 2023 02:08:12 +0100 (CET) as
excerpted:

> I've an issue that has been haunting me since a little. Konsole doesn't
> print properly some utf8 characters. They could be those two bytes long.
> At least I noticed it with flags, fruits, flowers and other icons that
> are two bytes long.

> I'm using KDE Plasma 5.25.4 on Fedora 35 and Konsole 21.12.2.

Live-git versions here (from the gentoo/kde overlay, tho I last updated 
Dec 26 so am a bit outdated ATM).

While my konsole usage seldom sees UTF-8 multi-byte chars so I can't say 
from personal experience, I CAN say from following the konsole git logs 
that there have been a number of apparently apropos commits recently, so 
they're aware of and working on the problem.  For instance (snipped a 
bit)...

* commit 986b84625
| CommitDate: Fri Dec 16 20:19:46 2022 +0000
|
|     Fixes for EastAsianWidth wide chars on RTL context
|
|     While real CJK wide characters are usually LTR, emoji, emoji-like
|     characters, and some others (e.g. Yi Radicals) can have the 
properties
|     'East_Asian_Width: Wide' and 'Bidi_Class: Other_Neutral', which on a 
RTL
|     context makes them inherit the RTL behavior.
|
|     This would cause trouble when e.g. inserting wide emoji in RTL text,

And

* commit 6d7d33ed7
| Author:     Luis Javier Merino MorĂ¡n
| AuthorDate: Fri Dec 16 00:10:31 2022 +0100
| Commit:     Kurt Hindenburg
| CommitDate: Fri Dec 16 20:19:46 2022 +0000
|
|     Fix regression with CJK wide chars at cursor
|
|     Commit 76f879cd7 changed greatly the way konsole renders text, to 
fix
|     some long-standing issues with RTL text, non-monospaced fonts, ...
|
|     Unfortunately, it also introduced a regression for CJK wide 
character
|     rendering, where it does not take properly into account their width.
|
|     BUG: 463031


The mentioned 76f8 commit was back in Aug, tho what version it was to 
compare with yours I can't immediately say.

* commit 76f879cd7
| Author:     Matan Ziv-Av
| AuthorDate: Sat Aug 6 19:15:42 2022 +0300
| Commit:     Kurt Hindenburg
| CommitDate: Fri Aug 26 19:24:56 2022 +0000
|
|     Draw characters in exact positions
|
|     QT can't be made to draw monospaced text (if the font does not 
cooperate),
|     so avoid combining characters, using a QPainter::drawText() call for 
each
|     character.
|
|     For bidi text support this change requires konsole to reorder and 
reshape
|     the characters. This is done using the ICU library (which QT also 
uses).
|
|     This change allows for some improvements related to text rendering:
|
|     - More precise bidi reordering, which is no longer changed by 
characters'
|       attributes and selection.
|     - underlines drawn separately from the text, allowing for differing
|       underline modes (double, curly, dashed, dotted, colored).
|     - Overriding font for emoji characters.

|     Emoji:
|     BUG: 440070
|     CCBUG: 450017
|     CCBUG: 445846
|     CCBUG: 453086

For version comparison purposes on the live-git, konsole currently reports 
23.03.70 on frameworks 5.102.0, with plasmashell --version saying 
5.26.80.  So decently ahead of your reported numbers...

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman



More information about the kde mailing list