tablewriter
tablewriter copied to clipboard
Non-ascii characters not printed well
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.
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
Because it is defined as half width in unicode. But your font draw the glyph as double width in terminal.
@carusyte @mimoo There is a command line utility YATG, option --width1-chars=emoji
can avoid this issue.