<!DOCTYPE html>
<meta charset="utf-8">
<style>
body { font: 32px monospace; }
div { text-align: center; unicode-bidi: bidi-override; }
</style>
<body>
<!--
http://unicode.org/reports/tr9/#N0, Example 1, AB and gh swapped:
gh ( CD [ & ef ] ! ) AB
-->
<div>gh(דג[&ef]!)בא</div>