[HACK]Facebook Wall Post and Comments Formatting with UNICODE

This was news for me (very seldomly post anything to Facebook, hardly ever read it any longer). But now I wanted to preserve indentation and use a monospace font in a Facebook wall post/post comment, like <pre> or “`. I was virtually certain that such functionality/markup existed. What about if you want to post a code snippet or a piece of structured data that you would like to remain human-readable (picture I suppose (wrongly most likely)). But the only way that I found that could provide some customization was this surprising UNICODE “hack”.

Firstly, when you have finished editing your post/comment, the editor will eat all leading white-space: ordinary spaces, no-break spaces, tabs, etc.. But if you use e.g. Unicode Character (U+3000) ‘Ideographic Space’ (dunno if other less ASCII:y space-like characters work as well), they will be kept.

Then; UNICODE has a ‘Mathematical Alphanumeric Symbols’ block containing e.g. ‘A’ (U+1D670) ‘Mathematical Monospace Capital A’ and so on. Found a web page, https://yaytext.com/monospace/,  that could convert between characters and basic symbols from the ASCII character set to characters from that block. So, could paste the JSON result and get something mono-spacey out. Neat.  Do that and replace leading whitespace with ‘Ideographic Space’s (also zeroes to 0+1D6F7 as the function on the linked to page does not convert them) and we’ve got … something,.. close enough to what we set out for for it to feel kindof like a success.

I don’t feel that this is the robustestest of solutions though and that it might change at any time. A screen-shot of an editor would have been easier, more reliable and more flexible. Syntax highlighting? Typeface? Highlighting? etc.. So, not very useful at all really. But learned a little about FB wall posts and UNICODE. Aligns well with the blog’s subtitle