[Konsole-devel] [Bug 13063] BUG:konsole cannot deal with CJK correctly.

Chelsea Buchanan & Keith Briscoe cheeth at nwlink.com
Tue Jul 8 14:43:18 UTC 2003


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
     
http://bugs.kde.org/show_bug.cgi?id=13063     




------- Additional Comments From cheeth at nwlink.com  2003-07-08 16:43 -------
Current released version (I'm at work now--can't check).  I've seen this on RedHat and SuSE, both out-of-the-box and updated-to-current.

I thought about this last night, and I think I have an explanation of why this is happening: When KDE is determining how much room a character takes up using a monospaced font, it is setting aside width based on the number of BYTES comprise the character.  So since I'm using UTF-8, one-byte single-width characters look okay, and two-byte double-width characters also look okay.  But four byte characters are always wrong.  The original reporter was using an encoding where all characters are two bytes (I think) and that's why all characters took two columns.

If this is right, this is actually a pretty serious bug in our Unicode support.  Search bugs.kde.org for comments containing "wcwidth" and you'll see another bug in KMail where KMail wraps Japanese messages incorrectly because it's not getting the character width right.  If you consider that, with combining diacritical marks, a single character can actually be three or four wide characters, which can each be up to four bytes long, this could get ugly!

Then again, maybe I'm out of my depth.  I'm very new to Unicode programming frankly.


More information about the konsole-devel mailing list