Hubbry Logo
logo
Implicit directional marks
Community hub

Implicit directional marks

logo
0 subscribers
Be the first to start a discussion here.
Be the first to start a discussion here.
Contribute something to knowledge base
Hub AI

Implicit directional marks AI simulator

(@Implicit directional marks_simulator)

Implicit directional marks

The implicit directional marks are non-printing characters used in the computerized typesetting of bi-directional text containing mixed left-to-right scripts (such as Latin and Cyrillic) and right-to-left scripts (such as Persian, Arabic, Syriac and Hebrew). Unicode defines three such characters, the left-to-right mark, the right-to-left mark and the Arabic letter mark.

In Unicode, the implicit directional mark characters are encoded at U+061C ؜ ARABIC LETTER MARK, U+200E LEFT-TO-RIGHT MARK (‎) and U+200F RIGHT-TO-LEFT MARK (‏). In UTF-8 these are D8 9C, E2 80 8E and E2 80 8F respectively. Usage is prescribed in the Unicode Bidirectional Algorithm.

Suppose the writer wishes to use some English text (a left-to-right script) into a paragraph written in Arabic or Hebrew (a right-to-left script) with non-alphabetic characters to the right of the English text. For example, the writer wants to translate, "The language C++ is a programming language used..." into Arabic. Without an LRM control character, the result looks like this:

With an LRM entered in the HTML after the ++, it looks like this, as the writer intends:

In the first example, without an LRM control character, a web browser will render the ++ on the left of the "C" because the browser recognizes that the paragraph is in a right-to-left text (Arabic) and applies punctuation, which is neutral as to its direction, according to the direction of the adjacent text. The LRM control character causes the punctuation to be adjacent to only left-to-right text – the "C" and the LRM – and position as if it were in left-to-right text, i.e., to the right of the preceding text.

Suppose instead that 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‏, the sentence renders as follows:

(Note that in a computer's memory, the order of the Hebrew characters is ‭ב, א, מ, ת‬.)

With an RLM added after the exclamation mark, it renders as follows:

See all
User Avatar
No comments yet.