lxqt / qtermwidget

The terminal widget for QTerminal
https://lxqt.github.io
GNU General Public License v2.0
501 stars 255 forks source link

Codes for characters in the East Asian Ambiguous category #61

Open rago1975 opened 8 years ago

rago1975 commented 8 years ago

In lib/konsole_wcwidth.cpp, lines 142-216, there are commented out codes, which treat width of characters in the East Asian Ambiguous category (defined in Unicode Technical Report 11).
Because I want to use these characters as double width character (width is 2) for using Vim, I added modifications to use these codes. The commit is here.

If there is someone who wants to use modified codes as a package, I will prepare as localized package (named like qtermwidget-cjk).

yan12125 commented 8 years ago

Hi, I got a similar problem and I propose to completely replace the ancient Konsole wcwidth implementation with a modern one: #94. Could you have a try on it?

rago1975 commented 8 years ago

Thanks for information, I will try.

yan12125 commented 8 years ago

Sorry, I have looked into your codes more carefully and found that my patch may not solve your problem.

Seems related: https://bugs.kde.org/show_bug.cgi?id=41744 https://bugs.kde.org/show_bug.cgi?id=387759

yan12125 commented 6 years ago

How VTE handles it: https://github.com/GNOME/vte/blob/master/doc/ambiguous.txt