Skip to content

Commit

Permalink
Corrections and minor cleanup for the bidi example.
Browse files Browse the repository at this point in the history
  • Loading branch information
aphillips committed Jan 28, 2023
1 parent 85fc0dc commit b73b570
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions index.html
Expand Up @@ -959,10 +959,9 @@ <h3>Generating or requiring creation of mixed direction strings</h3>
<pre dir="rtl">
&#x0645;&#x0627;&#x0631;&#x0643;&#x0629; A123B (1920 x 1080) 36" &#x0634;&#x0627;&#x0634;&#x0629; &#x0627;&#x0644;&#x0643;&#x0645;&#x0628;&#x064A;&#x0648;&#x062A;&#x0631;, 75 Hz, 4 &#x0645;&#x0644;&#x0644;&#x064A; &#x062B;&#x0627;&#x0646;&#x064A;&#x0629;, &#x0645;&#x0643;&#x0628;&#x0631;&#x0627;&#x062A; &#x0635;&#x0648;&#x062A; &#x0645;&#x062F;&#x0645;&#x062C;&#x0629;</pre>

<p>Notice how the part number (<kbd>A123B</kbd>) is separated from the brand name, the measurement <kbd>36</kbd> and the marker for inches (<kbd>"</kbd>) have become separated or that the values <kbd>75 Hz</kbd> (where the measurement is in ASCII) and <kbd>4 ms</kbd> (where the measurement has an Arabic translation <code>&#x0645;&#x0644;&#x0644;&#x064A; &#x062B;&#x0627;&#x0646;&#x064A;&#x0629;</code>) both separate the number from the measurement. Generating labels from a sequence of string tokens requires extra care to ensure that the complete string is "bidirectionally clean" and will display properly to the user. Adding isolating bidirectional controls to the above string produces better results:</p>
<p>Notice how the part number (<kbd>A123B</kbd>) is separated from the brand name (<kbd>&#x0645;&#x0627;&#x0631;&#x0643;&#x0629;</kbd>), the measurement <kbd>36</kbd> and the marker for inches (<kbd>"</kbd>) have become separated and that the values <kbd>75 Hz</kbd> (where the measurement is in ASCII) and <kbd>4 ms</kbd> (where the measurement has an Arabic translation <kbd>&#x0645;&#x0644;&#x0644;&#x064A; &#x062B;&#x0627;&#x0646;&#x064A;&#x0629;</kbd>) both separate the number from the measurement. Generating labels from a sequence of string tokens requires extra care to ensure that the complete string is "bidirectionally clean" and will display properly to the user. Adding isolating bidirectional controls to the above string produces better results:</p>

<pre dir="rtl">
&#x0645;&#x0627;&#x0631;&#x0643;&#x0629; A123B &#x2066;(1920 x 1080)&#x2069; &#x2066;36"&#x2069; &#x0634;&#x0627;&#x0634;&#x0629; &#x0627;&#x0644;&#x0643;&#x0645;&#x0628;&#x064A;&#x0648;&#x062A;&#x0631;, &#x2066;75 Hz&#x2069;, &#x2067;4 &#x0645;&#x0644;&#x0644;&#x064A; &#x062B;&#x0627;&#x0646;&#x064A;&#x0629;&#x2069;, &#x0645;&#x0643;&#x0628;&#x0631;&#x0627;&#x062A; &#x0635;&#x0648;&#x062A; &#x0645;&#x062F;&#x0645;&#x062C;&#x0629;
<pre dir="rtl">&#x0645;&#x0627;&#x0631;&#x0643;&#x0629; A123B &#x2066;(1920 x 1080)&#x2069; &#x2066;36"&#x2069; &#x0634;&#x0627;&#x0634;&#x0629; &#x0627;&#x0644;&#x0643;&#x0645;&#x0628;&#x064A;&#x0648;&#x062A;&#x0631;, &#x2067;75 Hz&#x2069;, &#x2067;4 &#x0645;&#x0644;&#x0644;&#x064A; &#x062B;&#x0627;&#x0646;&#x064A;&#x0629;&#x2069;, &#x0645;&#x0643;&#x0628;&#x0631;&#x0627;&#x062A; &#x0635;&#x0648;&#x062A; &#x0645;&#x062F;&#x0645;&#x062C;&#x0629;
</pre>
</aside>

Expand Down

0 comments on commit b73b570

Please sign in to comment.