Свойства

Свойство зеркального отражения

Символы, глиф которых должен зеркально отражаться в RTL-контексте. Примеры: ( → ), [ → ], { → }, « → ».

· Updated

What Is the Bidi_Mirrored Property?

The Bidi_Mirrored property is a Boolean property that marks characters whose glyph should be horizontally reflected when appearing in a right-to-left (RTL) context. In an RTL paragraph, an opening parenthesis ( should visually appear as ) and vice versa, because the semantic role (open vs. close) is independent of whether the text flows left-to-right or right-to-left.

The Unicode Bidirectional Algorithm (UAX #9) applies mirroring automatically during text rendering for characters with Bidi_Mirrored=Yes. A rendering engine does not swap code points; instead it selects the mirrored glyph from the font, or uses the Bidi_Mirroring_Glyph property to find the corresponding code point when a dedicated glyph is not available.

Characters with Bidi_Mirrored=Yes

The most familiar mirrored characters are paired delimiters, but the property covers a wider range:

import unicodedata

# Check Bidi_Mirrored flag (1 = mirrored, 0 = not mirrored)
candidates = [
    ("(", "LEFT PARENTHESIS"),
    (")", "RIGHT PARENTHESIS"),
    ("[", "LEFT SQUARE BRACKET"),
    ("{", "LEFT CURLY BRACKET"),
    ("<", "LESS-THAN SIGN"),
    (">", "GREATER-THAN SIGN"),
    ("⟨", "MATHEMATICAL LEFT ANGLE BRACKET"),
    ("∈", "ELEMENT OF"),
    ("A", "LATIN CAPITAL LETTER A"),
]

for char, name in candidates:
    m = unicodedata.mirrored(char)
    print(f"  {char}  mirrored={m}  {name}")

# (  mirrored=1  LEFT PARENTHESIS
# )  mirrored=1  RIGHT PARENTHESIS
# [  mirrored=1  LEFT SQUARE BRACKET
# {  mirrored=1  LEFT CURLY BRACKET
# <  mirrored=1  LESS-THAN SIGN
# >  mirrored=1  GREATER-THAN SIGN
# ⟨  mirrored=1  MATHEMATICAL LEFT ANGLE BRACKET
# ∈  mirrored=1  ELEMENT OF
# A  mirrored=0  LATIN CAPITAL LETTER A

Bidi_Mirroring_Glyph vs. Bidi_Mirrored

Bidi_Mirrored=Yes says this character needs mirroring. The companion Bidi_Mirroring_Glyph property gives the code point of the character whose glyph should be used as the mirrored form—for example, (). For mathematical symbols like ∈ (ELEMENT OF), the mirroring glyph is ∋ (CONTAINS AS MEMBER). If a font contains both glyphs, the renderer selects the appropriate one automatically.

When no mirroring glyph exists (the value is <none> in the data), the renderer must synthesize a mirrored glyph, typically by applying a horizontal flip transformation.

Quick Facts

Property Value
Unicode property name Bidi_Mirrored
Short alias Bidi_M
Type Boolean
Python function unicodedata.mirrored(char) → 1 or 0
Characters with value Yes (Unicode 15.1) ~570
Companion property Bidi_Mirroring_Glyph
Spec reference Unicode Standard Annex #9 (UAX #9)

Связанные термины

Ещё в Свойства

East Asian Width

Unicode property (UAX#11) classifying characters as Narrow, Wide, Fullwidth, Halfwidth, Ambiguous, or …

Joining Type

Unicode property controlling how Arabic and Syriac characters connect to adjacent characters. …

Script Extensions

Unicode property listing all scripts that use a character, broader than the …

Блок

Именованный непрерывный диапазон кодовых позиций (например, Basic Latin = U+0000–U+007F). Unicode 16.0 …

Двунаправленная категория

Свойство, определяющее поведение символа в двунаправленном тексте (LTR, RTL, слабое, нейтральное). Используется …

Декомпозиция

Отображение символа на его компоненты. Каноническая декомпозиция сохраняет значение (é → e …

Игнорируемый по умолчанию

Символы, не имеющие видимого эффекта и игнорируемые процессами, которые их не поддерживают, …

Каноническая эквивалентность

Две последовательности символов, семантически идентичные и трактуемые как равные. Пример: é (U+00E9) …

Класс объединения

Числовое значение (0–254), управляющее порядком комбинирующих знаков при канонической декомпозиции и определяющее, …

Кластер графем

Воспринимаемый пользователем «символ» — то, что ощущается как единое целое. Может состоять …