How to make an "ASCII" art table for Facebook or Twitter?

2

1

How to have a table on services that only support plain text like Facebook or Twitter, since they are all misaligned for not having a mono-spaced typeface? In other words, how to turn this:

╔═══════════════════════════════════╦════════════╦════════╗
║ Col1 ║ Col2 ║ NumCol ║
╠═══════════════════════════════════╬════════════╬════════╣
║ Value 1 ║ Value 2 ║ 123 ║
║ This is a row with only one cell ║ ║ ║
║ This row is testing html entities ║ Te
st ║ 45 ║
╚═══════════════════════════════════╩════════════╩════════╝

to this:

╔═══════════════════════════════════╦════════════╦════════╗
║               Col1                ║    Col2    ║ NumCol ║
╠═══════════════════════════════════╬════════════╬════════╣
║ Value 1                           ║ Value 2    ║    123 ║
║ This is a row with only one cell  ║            ║        ║
║ This row is testing html entities ║ Te<br />st ║     45 ║
╚═══════════════════════════════════╩════════════╩════════╝

?


FYI: Is there a web app to create ASCII art tables? - Web Applications Stack Exchange

Ooker

Posted 2014-09-04T18:49:13.183

Reputation: 1 242

4ASCII art needs mono-spaced fonts, or at least predictable fonts, to work. It was good in the 80's when all fonts were mono-spaced... & should be left there... – Tetsujin – 2014-09-04T18:53:20.473

I have the same question. I bet it's possible. http://qaz.wtf/u/convert.cgi and http://slothsoft.net/UnicodeMapper/?lang=en-us look like cool tools, but I haven't quite figured out the monospacing for space characters yet.

– Ryan – 2017-10-02T11:42:45.110

Answers

6

The table is misaligned because it requires mono-spacing. Mono-spaced fonts are not used by Twitter and Facebook, but you may be able to replace the text with corresponding unicode fixed-width characters. This is not technically mono-spaced, characters are not necessarily positioned in alignment with a fixed grid and to my knowledge, there is no fullwidth equivalent for characters like the space, but the predictable spacing may make it a lot easier to create a decent looking table nonetheless.

The unicode block for halfwidth and fullwidth characters is U+FF00 to U+FFEF and text written in those characters looks like this. You may want to use a tool to convert text automaticaly, such as this one. The linked page also has some interesting background reading on the purpose of this set of characters.

Marcks Thomas

Posted 2014-09-04T18:49:13.183

Reputation: 5 749

2

You can't. Doing so requires the use of a fixed-width font, and there's no way to force that on Facebook or Twitter clients.

You also can't make use of HTML <TABLE>s, either, since there's no provision for specifying/entering them.

ewhac

Posted 2014-09-04T18:49:13.183

Reputation: 511

So is there any way to establish a table in Facebook or Twitter without adding an image? – Ooker – 2014-09-04T19:14:21.363

Not to my knowledge. <TABLE>s have a history of being abused by griefers in comment/discussion fora to ruin the page layout to the point of unusability, so it's not entirely surprising they're not supported. – ewhac – 2014-09-04T19:20:16.077

1Are you sure there's no way to force text to be rendered mono-spaced? – Marcks Thomas – 2014-09-04T19:34:49.800

@ewhac. Griefers, the players who irritate other players? Why they do that? I can't see any connection to the table. – Ooker – 2014-09-04T19:36:48.997