rtorrent-ps
rtorrent-ps copied to clipboard
Optimize name column chopping with `wcwidth`
- Might need configure test for
wcwidth
(skip that if it compiles on Precise) - Add to canvas rendering code
- need to check how to easily decode UTF-8 sequences into code points
- do a pre-check for pure ASCII, then just use
substr
- Inserting spaces or bumping the column position might also be needed
- Find an adequate test case that causes visual defects with the existing code
See also https://github.com/rakshasa/rtorrent/issues/755
Oi, didn't see this. If you want a test, look at https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms for double width examples.
If you want, I made a simple tool doing the job (http://repo.or.cz/misc-tools.git/blob/HEAD:/mbcut.c). You could copy paste some of it.