1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-08-01 05:27:45 +00:00

more: fix unicode bug for breakline

- Use `unicode_segmentation` and `unicode_width` to determine proper `break_line` position.
- Keep track of total_width as suggested by @tertsdiepraam.
- Add unittest for ZWJ unicode case

Related to #2319.
This commit is contained in:
Dean Li 2021-06-02 21:40:47 +08:00
parent 132ddf98b6
commit acd290d11f
No known key found for this signature in database
GPG key ID: 4F55BB69D480672A
3 changed files with 50 additions and 16 deletions

2
Cargo.lock generated
View file

@ -2204,6 +2204,8 @@ dependencies = [
"nix 0.13.1",
"redox_syscall 0.1.57",
"redox_termios",
"unicode-segmentation",
"unicode-width",
"uucore",
"uucore_procs",
]