goodell/nowrap — Issue #1: Does not account for (dynamic) width of <Tab> characters (and any double-width characters). 
Author: inkarkat
Created: 2011-11-21 10:00:14+00:00
State: open

First of all, thanks for this neat script, it is very useful.

One feature that it's missing is that Tab characters (\t) are counted as a single-width character, not the 1-8 characters that it actually occupies (depending on the position) when printed. This can be worked around by piping the output first through `expand`:

cat textfile | expand | nowrap

I dunno whether it's easy to implement in the Perl script (maybe there's a library that expands tabs?). Maybe it's sufficient to document the workaround. I just wanted to let you know.

Related, but even more complicated is double-width non-ASCII characters, like the east-Asian Kanji characters used in Chinese and Japanese. These aren't properly accounted for, neither.

-- regards, ingo