&gt; There is really no way for a simple program to account for all of those possible edge cases.<p>The post to linked you contained a piece of boiler-plate code which accounts for said cases.<p>&gt; Have you considered how your formatting is going to look when people intersperse Right to Left words in your output for example?<p>There are modules to handle this. It of course means that you have to stop using non-Unicode-aware functions like `sprintf`.