Bug 210329 - some unicode characters are displayed as whitespace
Summary: some unicode characters are displayed as whitespace
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
: 230192 (view as bug list)
Depends on:
Reported: 2009-10-12 16:34 UTC by Joke de Buhr
Modified: 2011-10-17 16:20 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.8


Note You need to log in before you can comment on or make changes to this bug.
Description Joke de Buhr 2009-10-12 16:34:37 UTC
Version:            (using KDE 4.3.2)
OS:                Linux
Installed from:    Ubuntu Packages

My z-shell themes uses some unicode characters as prompt borders. Konsole doesn't show some corner characters of these character bounding boxes. It just displays them as whitespaces.

these characters are displayed:
    '─' U+2500, '├' U+251C
these and other arc characters are displayed as whitespace:
    '╭' U+256D, '╰' U+2570

Konsole uses UTF-8 encoding and locales are set to en_US.UTF-8 and are installed. DejaVu Sans Mono is used as Font. The shell file is encoded correctly.

Other KDE applications like Kate with DejaVu font can display all characters without problem. Cut&Paste from Kate to openoffice works fine but not paste to Konsole commandline. Cut&Paste the whitespace back to Kate displays all characters.

It's not a z-shell problem. Xterm can display these characters with zsh and Konsole running bash catting the file produces spaces.

Konsole versions of KDE3 didn't have this problem.
Comment 1 Joke de Buhr 2009-12-14 22:52:40 UTC
The bugs affects 4.3.3 and 4.3.4 as well.
Comment 2 Jekyll Wu 2011-07-19 07:44:53 UTC
possibly related with #230192
Comment 3 Kurt Hindenburg 2011-07-19 10:55:47 UTC
*** Bug 230192 has been marked as a duplicate of this bug. ***
Comment 4 Jekyll Wu 2011-07-19 19:46:58 UTC
hI think I have figured out why they are not displayed correctly.

A small subset (U+2500 ~ U+257F) of unicode characters , referred as linechars
in the code, are drawn in a special way. They are drawn according their
corresponding value in LineChars[] array in LineFont.h, which is automatically
generated from LineFont.src in the building process. However, some characters
lack definitions in LineFont.src, so they will be drawn as whitespace(?),
instead of the expected glyph.

The code flow for drawing these characters is: TerminalDisplay::drawCharacters()
--> TerminalDisplay::drawLineCharString() --> drawLineChar()

Why they are drawn in this special way and how to fix the missing definitions
are definitely beyond my knowledge. And the last change on LineFont.src is 4
years ago.

The influenced characters are listed below.

┄ 	U+2504
┅ 	U+2505
┆ 	U+2506
┇       U+2507
┈ 	U+2508
┉ 	U+2509
┊ 	U+250A
┋       U+250B

╌ 	U+254C
╍ 	U+254D
╎ 	U+254E
╏       U+254F

╭ 	U+256D
╮ 	U+256E
╯       U+256F
╰ 	U+2570
╱ 	U+2571
╲ 	U+2572
╳       U+2573
Comment 5 Jekyll Wu 2011-07-22 13:22:34 UTC

I tested my comment #4 in xterm, rxvt-uniocde, xfce4-terminal and gnome-terminal, and they all showed those influenced characters correctly. It' only konsole that can't show them.

Please confirm this bug as 'New', seriously.
Comment 6 Kurt Hindenburg 2011-07-22 13:36:11 UTC
Whether a bug is NEW or UNCONFIRMED doesn't make a lot of difference.  As you've noticed there are a ton of bugs and I've never been able to keep up doing this alone.

Thanks for your help recently.
Comment 7 Jekyll Wu 2011-10-17 16:20:31 UTC
Git commit c53d790f31d7a23e59b37b44c4529ae8229e8204 by Jekyll Wu.
Committed on 12/10/2011 at 14:50.
Pushed by jekyllwu into branch 'master'.

Draw some fail-to-simulate box-drawing characters in the normal way.


M  +28   -1    src/Character.h
M  +4    -1    src/TerminalDisplay.cpp