Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Implicit directional marks

From Wikipedia, the free encyclopedia
(Redirected fromLeft-to-right mark)
Control characters in bidirectional text

Theimplicit directional marks arenon-printing characters used in the computerizedtypesetting ofbi-directional text containing mixed left-to-right scripts (such asLatin andCyrillic) and right-to-left scripts (such asPersian,Arabic,Syriac andHebrew). Unicode defines three such characters, theleft-to-right mark, theright-to-left mark and theArabic letter mark.

Unicode

[edit]

InUnicode, the implicit directional mark characters are encoded atU+061C ؜ARABIC LETTER MARK,U+200E LEFT-TO-RIGHT MARK (‎) andU+200F RIGHT-TO-LEFT MARK (‏). InUTF-8 these areD8 9C,E2 80 8E andE2 80 8F respectively.Usage is prescribed in theUnicode Bidirectional Algorithm.[1]

Example of use in HTML

[edit]

Left-to-Right Mark

[edit]

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:

لغة C++ هي لغة برمجة تستخدم...

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

لغة C++‎ هي لغة برمجة تستخدم...

In the first example, without an LRM control character, aweb 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.

Right-to-Left Mark

[edit]

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:

I enjoyed staying -- באמת! -- at his house.

(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:

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 surrounding (left-to-right) text. The RLM causes the punctuation to be surrounded by only RTL text—the Hebrew and the RLM—and hence be positioned as if it were in right-to-left text, i.e., to the left of the preceding text.

Arabic Letter Mark

[edit]

Similar to the right-to-left mark (RLM), it is used to change the way adjacent characters are grouped with respect to text direction, with some difference on how it affects the bidirectional level resolutions for nearby characters.[example needed]

See also

[edit]

References

[edit]
  1. ^UNICODE 12.0 Standard,http://www.unicode.org/versions/Unicode12.0.0/UnicodeStandard-12.0.pdf, p. 880

External links

[edit]
Unicode
Code points
Characters
Special purpose
Lists
Processing
Algorithms
Comparison of encodings
On pairs of
code points
Usage
Related standards
Related topics
Scripts and symbols in Unicode
Common and
inherited scripts
Modern scripts
Ancient and
historic scripts
Notational scripts
Symbols, emojis


Retrieved from "https://en.wikipedia.org/w/index.php?title=Implicit_directional_marks&oldid=1287953280"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp