Right-to-left mark
Encyclopedia
The right-to-left mark is a non-printing character used in the computerized typesetting
Typesetting
Typesetting is the composition of text by means of types.Typesetting requires the prior process of designing a font and storing it in some manner...

 of bi-directional text
Bi-directional text
Bi-directional text is text containing text in both text directionalities, both right-to-left and left-to-right . It generally involves text containing different types of alphabets, but may also refer to boustrophedon, which is changing text directionality in each row.Some writing systems of the...

 containing mixed left-to-right scripts (such as English
English language
English is a West Germanic language that arose in the Anglo-Saxon kingdoms of England and spread into what was to become south-east Scotland under the influence of the Anglian medieval kingdom of Northumbria...

 and Russian
Russian language
Russian is a Slavic language used primarily in Russia, Belarus, Uzbekistan, Kazakhstan, Tajikistan and Kyrgyzstan. It is an unofficial but widely spoken language in Ukraine, Moldova, Latvia, Turkmenistan and Estonia and, to a lesser extent, the other countries that were once constituent republics...

) and right-to-left scripts (such as Arabic, Persian
Persian language
Persian is an Iranian language within the Indo-Iranian branch of the Indo-European languages. It is primarily spoken in Iran, Afghanistan, Tajikistan and countries which historically came under Persian influence...

 and Hebrew). It is used to change the way adjacent characters are grouped with respect to text direction.

In Unicode

The RLM's Unicode
Unicode
Unicode is a computing industry standard for the consistent encoding, representation and handling of text expressed in most of the world's writing systems...

 symbol is , and can be represented in as ‏ ‏ or ‏. UTF-8
UTF-8
UTF-8 is a multibyte character encoding for Unicode. Like UTF-16 and UTF-32, UTF-8 can represent every character in the Unicode character set. Unlike them, it is backward-compatible with ASCII and avoids the complications of endianness and byte order marks...

 is E2 80 8F. Usage is prescribed in the Unicode Bidirectional Algorithm.

Example of use in HTML

Suppose the writer wishes to inject a run of Arabic or Hebrew (i.e. right-to-left) text into an English paragraph, with an exclamation point at the end of the run on the left hand side. "I enjoyed staying -- really! -- at his house." With the "really!" in Hebrew renders as follows:
I enjoyed staying—באמת! -- at his house.
With an RLM mark entered in the HTML after the exclamation mark, it renders as follows:
I enjoyed staying—באמת!‏ -- at his house.
[Standards-compliant browsers will render the exclamation mark on the right in the first example, and on the left in the second]

This happens because the browser recognizes that the paragraph is in a LTR script (Latin), and applies punctuation, which is neutral as to its direction, in coordination with the more prominent (paragraph level) adjacent text. The RLM causes the punctuation to be adjacent to only RTL text - the Hebrew and the RLM mark - and hence position as if it were in right-to-left text, i.e., to the left of the preceding text.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK