How are non left-to-right top-to-bottom languages handled in the computer?

Top-to-bottom languages are invariably rendered left-to-right. (Japanese being the most common example.) Nobody’s confused by this.

For right-to-left languages, there’s a Unicode characters that change text direction (200f for right-to-left, 200e for left-to-right). It’s hilarious to use in English. Alas, this forum doesn’t seem to allow it…