tablewriter icon indicating copy to clipboard operation
tablewriter copied to clipboard

Non-ascii characters not printed well

Open carusyte opened this issue 7 years ago • 3 comments

Some characters not in the ASCII set occupies more than one space when printed in the console, so the resulting output table may not appear elegant if some of the rows contain non-ASCII content.

carusyte avatar Apr 01 '17 07:04 carusyte

can confirm:

| ls.go~            |  175 |         |
| prout             |   68 | 📂      |
| prout.go          |  145 |         |

the folder unicode mess things up

edit: it doesn't on github for some reason :D

mimoo avatar May 24 '17 14:05 mimoo

Because it is defined as half width in unicode. But your font draw the glyph as double width in terminal.

mattn avatar May 24 '17 16:05 mattn

@carusyte @mimoo There is a command line utility YATG, option --width1-chars=emoji can avoid this issue.

10gic avatar Apr 07 '18 16:04 10gic