Support Unicode box drawing
amirgon opened this issue · comments
Amir Gonnen commented
Unicode Box Drawing allows clean formatting of tables, including all types of corners.
These characters are also present on the Extended ASCII set with certain code pages, when not using wide characters.
In the example I can see you are using a dot character as a corner, which is not as clean.
I've attempted to achieve this with formatting:
table.format().multi_byte_characters(true).locale(std::locale::classic().name());
table.format().corner("").border("");
table.format().border_left("│").border_right("│");
table[0].format().corner_top_left("┌").corner_top_right("┐").border_top("─").border_bottom("─");
table[1].format().border_top("─").corner_top_left("├").corner_top_right("┤");
table[table.size() - 1].format().border_bottom("─").corner_bottom_left("└").corner_bottom_right("┘");
which yields something like this:
This result is not perfect and tedious for format.
Instead, it could be very useful to have a built-in support for Unicode box drawing.