lnav icon indicating copy to clipboard operation
lnav copied to clipboard

Text-wrapping issues with CJK characters

Open mark9804 opened this issue 4 years ago • 1 comments

lnav version v0.10.0

Environment macOS 11.6 (20G165)

Describe the bug In CJK monospace characters, one character takes up 2 ASCII letter spaces. But in lnav, maybe the text-wrap function thought they both took up the same spaces (One letter width per character) , and this may be the reason of the issue.

I will explain this with the following screenshot. image

In the screenshot above, the first line consists of five character groups, each consisting ten Chinese characters and six ASCII characters (indicating group number).

The second line is made up of pure ASCII characters.

Lnav successfully wrapped the second line, but failed to wrap the first line.

To Reproduce I will provide the test characters below.

一二三四五六七八九十Group1一二三四五六七八九十Group2一二三四五六七八九十Group3一二三四五六七八九十Group4一二三四五六七八九十Group5

This is an example of a normally-behavioring text wrap example. All letters are ASCII and containing no CJK letters.

mark9804 avatar Oct 22 '21 04:10 mark9804

Thanks for the writeup! There are definitely bugs in this area and this should help get them cleared up.

Related to #840

tstack avatar Oct 23 '21 22:10 tstack