aptinio / text-table

A feature-rich, easy-to-use plain text table formatter.
MIT License
96 stars 14 forks source link

Count a multibyte char width as 2 chars width #12

Open adorechic opened 8 years ago

adorechic commented 8 years ago

Current code uses the number of characters as a text width, so that a table rows which includes multibyte characters have different width. If we put 3 byte characters to be 2 times wider than ascii characters, a table rows have same width on monospaced font.

text-table-multibyte

adorechic commented 8 years ago

oops, does this gem supports ruby 1.8 and 1.9? I will fix it.

adorechic commented 8 years ago

I fixed to pass ruby 1.8 or 1.9 specs. PTAL!

aptinio commented 8 years ago

Thanks @adorechic. I'll take a look at this hopefully this week.