Unicode Utilities: BIDI (UBA) C Reference

Properties use ICU for Unicode V11.0; the beta properties support Unicode V12.0β. For more information, see Unicode Utilities Beta.

help | character | properties | confusables | unicode-set | compare-sets | regex | bnf-regex | breaks | transform | bidi | bidi-c | idna | languageid

Shows processing of a single paragraph of text by the Unicode Bidirectional Algorithm (UBA), Versions 6.2 through 11.0, using the C Reference Implementation, Version 11.0.

Source

Insert:  
Text:          0645 0627 0631 0652 0643 0020 2066 0031 2013 0033 0025 2069 0020 006D 0061 0072 006B 0020 0028 0366 0076 002E 0032 0029 0368 0021
Memory pos.
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Character مارْك 13% mark (ͦv.2)ͨ!
Code point
0645
0627
0631
0652
0643
0020
2066
0031
2013
0033
0025
2069
0020
006D
0061
0072
006B
0020
0028
0366
0076
002E
0032
0029
0368
0021
Paragraph:   UBA Version:   Detail:

Resolved Levels

Memory pos.
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Level
1
1
1
1
1
1
1
2
2
2
2
1
1
2
2
2
2
2
2
2
2
2
2
2
2
1

Reordered Display

Display pos.
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Memory pos.
25
13
14
15
16
17
18
19
20
21
22
23
24
12
11
7
8
9
10
6
5
4
3
2
1
0
Character !mark (ͦv.2)ͨ 13% كْرام
Code point
0021
006D
0061
0072
006B
0020
0028
0366
0076
002E
0032
0029
0368
0020
2069
0031
2013
0033
0025
2066
0020
0643
0652
0631
0627
0645

Analysis

Note:  Initialized bidiref 11.0.0 library for UBA version 11.0
Trace: Entering br_UBA_63
Trace: Entering br_UBA63_ParagraphEmbeddingLevel [P2, P3]
Current State: 2
Paragraph Dir: 2 (Dir_Auto), Paragraph Embed Level: 1, TextLen: 26

  Text:        0645 0627 0631 0652 0643 0020 2066 0031 2013 0033 0025 2069 0020 006D 0061 0072 006B 0020 0028 0366 0076 002E 0032 0029 0368 0021
  Bidi_Class:    AL   AL   AL  NSM   AL   WS  LRI   EN   ON   EN   ET  PDI   WS    L    L    L    L   WS   ON  NSM    L   CS   EN   ON  NSM   ON
  Levels:         0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0

Trace: Entering br_UBA63_ExplicitEmbeddingLevels [X1-X8]
Current State: 3
  Text:        0645 0627 0631 0652 0643 0020 2066 0031 2013 0033 0025 2069 0020 006D 0061 0072 006B 0020 0028 0366 0076 002E 0032 0029 0368 0021
  Bidi_Class:    AL   AL   AL  NSM   AL   WS  LRI   EN   ON   EN   ET  PDI   WS    L    L    L    L   WS   ON  NSM    L   CS   EN   ON  NSM   ON
  Levels:         1    1    1    1    1    1    1    2    2    2    2    1    1    1    1    1    1    1    1    1    1    1    1    1    1    1

Trace: Entering br_UBA_DeleteFormatCharacters [X9]
Trace: Entering br_UBA_IdentifyRuns [X10]
Current State: 5
  Position:       0    1    2    3    4    5    6    7    8    9   10   11   12   13   14   15   16   17   18   19   20   21   22   23   24   25
  Text:        0645 0627 0631 0652 0643 0020 2066 0031 2013 0033 0025 2069 0020 006D 0061 0072 006B 0020 0028 0366 0076 002E 0032 0029 0368 0021
  Bidi_Class:    AL   AL   AL  NSM   AL   WS  LRI   EN   ON   EN   ET  PDI   WS    L    L    L    L   WS   ON  NSM    L   CS   EN   ON  NSM   ON
  Levels:         1    1    1    1    1    1    1    2    2    2    2    1    1    1    1    1    1    1    1    1    1    1    1    1    1    1
  Runs:        <R------------------------------L> <L---------------L> <L----------------------------------------------------------------------R>

Trace: Entering br_UBA_IdentifyIsolatingRunSequences [X10]
Current State: 6
  Position:       0    1    2    3    4    5    6    7    8    9   10   11   12   13   14   15   16   17   18   19   20   21   22   23   24   25
  Text:        0645 0627 0631 0652 0643 0020 2066 0031 2013 0033 0025 2069 0020 006D 0061 0072 006B 0020 0028 0366 0076 002E 0032 0029 0368 0021
  Bidi_Class:    AL   AL   AL  NSM   AL   WS  LRI   EN   ON   EN   ET  PDI   WS    L    L    L    L   WS   ON  NSM    L   CS   EN   ON  NSM   ON
  Levels:         1    1    1    1    1    1    1    2    2    2    2    1    1    1    1    1    1    1    1    1    1    1    1    1    1    1
  Runs:        <R------------------------------L> <L---------------L> <L----------------------------------------------------------------------R>
  Seqs (L= 1): <R-------------------------------[.....................]-----------------------------------------------------------------------R>
  Seqs (L= 2):                                    <L---------------L>

Trace: Entering br_UBA_ResolveCombiningMarks [W1]
Current State: 7
  Text:        0645 0627 0631 0652 0643 0020 2066 0031 2013 0033 0025 2069 0020 006D 0061 0072 006B 0020 0028 0366 0076 002E 0032 0029 0368 0021
  Bidi_Class:    AL   AL   AL   AL   AL   WS  LRI   EN   ON   EN   ET  PDI   WS    L    L    L    L   WS   ON   ON    L   CS   EN   ON   ON   ON
  Levels:         1    1    1    1    1    1    1    2    2    2    2    1    1    1    1    1    1    1    1    1    1    1    1    1    1    1
  Runs:        <R------------------------------L> <L---------------L> <L----------------------------------------------------------------------R>

Trace: Entering br_UBA_ResolveEuropeanNumbers [W2]
Trace: Entering br_UBA_ResolveAL [W3]
Current State: 9
  Text:        0645 0627 0631 0652 0643 0020 2066 0031 2013 0033 0025 2069 0020 006D 0061 0072 006B 0020 0028 0366 0076 002E 0032 0029 0368 0021
  Bidi_Class:     R    R    R    R    R   WS  LRI   EN   ON   EN   ET  PDI   WS    L    L    L    L   WS   ON   ON    L   CS   EN   ON   ON   ON
  Levels:         1    1    1    1    1    1    1    2    2    2    2    1    1    1    1    1    1    1    1    1    1    1    1    1    1    1
  Runs:        <R------------------------------L> <L---------------L> <L----------------------------------------------------------------------R>

Trace: Entering br_UBA_ResolveSeparators [W4]
Trace: Entering br_UBA_ResolveTerminators [W5]
Current State: 11
  Text:        0645 0627 0631 0652 0643 0020 2066 0031 2013 0033 0025 2069 0020 006D 0061 0072 006B 0020 0028 0366 0076 002E 0032 0029 0368 0021
  Bidi_Class:     R    R    R    R    R   WS  LRI   EN   ON   EN   EN  PDI   WS    L    L    L    L   WS   ON   ON    L   CS   EN   ON   ON   ON
  Levels:         1    1    1    1    1    1    1    2    2    2    2    1    1    1    1    1    1    1    1    1    1    1    1    1    1    1
  Runs:        <R------------------------------L> <L---------------L> <L----------------------------------------------------------------------R>

Trace: Entering br_UBA_ResolveESCSET [W6]
Current State: 12
  Text:        0645 0627 0631 0652 0643 0020 2066 0031 2013 0033 0025 2069 0020 006D 0061 0072 006B 0020 0028 0366 0076 002E 0032 0029 0368 0021
  Bidi_Class:     R    R    R    R    R   WS  LRI   EN   ON   EN   EN  PDI   WS    L    L    L    L   WS   ON   ON    L   ON   EN   ON   ON   ON
  Levels:         1    1    1    1    1    1    1    2    2    2    2    1    1    1    1    1    1    1    1    1    1    1    1    1    1    1
  Runs:        <R------------------------------L> <L---------------L> <L----------------------------------------------------------------------R>

Trace: Entering br_UBA_ResolveEN [W7]
Current State: 13
  Text:        0645 0627 0631 0652 0643 0020 2066 0031 2013 0033 0025 2069 0020 006D 0061 0072 006B 0020 0028 0366 0076 002E 0032 0029 0368 0021
  Bidi_Class:     R    R    R    R    R   WS  LRI    L   ON    L    L  PDI   WS    L    L    L    L   WS   ON   ON    L   ON    L   ON   ON   ON
  Levels:         1    1    1    1    1    1    1    2    2    2    2    1    1    1    1    1    1    1    1    1    1    1    1    1    1    1
  Runs:        <R------------------------------L> <L---------------L> <L----------------------------------------------------------------------R>

Trace: Entering br_UBA_ResolvePairedBrackets [N0]
Current State: 14
  Text:        0645 0627 0631 0652 0643 0020 2066 0031 2013 0033 0025 2069 0020 006D 0061 0072 006B 0020 0028 0366 0076 002E 0032 0029 0368 0021
  Bidi_Class:     R    R    R    R    R   WS  LRI    L   ON    L    L  PDI   WS    L    L    L    L   WS    L    L    L   ON    L    L    L   ON
  Levels:         1    1    1    1    1    1    1    2    2    2    2    1    1    1    1    1    1    1    1    1    1    1    1    1    1    1
  Runs:        <R------------------------------L> <L---------------L> <L----------------------------------------------------------------------R>

Trace: Entering br_UBA_ResolveNeutralsByContext [N1]
Current State: 15
  Text:        0645 0627 0631 0652 0643 0020 2066 0031 2013 0033 0025 2069 0020 006D 0061 0072 006B 0020 0028 0366 0076 002E 0032 0029 0368 0021
  Bidi_Class:     R    R    R    R    R   WS  LRI    L    L    L    L  PDI   WS    L    L    L    L    L    L    L    L    L    L    L    L   ON
  Levels:         1    1    1    1    1    1    1    2    2    2    2    1    1    1    1    1    1    1    1    1    1    1    1    1    1    1
  Runs:        <R------------------------------L> <L---------------L> <L----------------------------------------------------------------------R>

Trace: Entering br_UBA_ResolveNeutralsByLevel [N2]
Current State: 16
  Text:        0645 0627 0631 0652 0643 0020 2066 0031 2013 0033 0025 2069 0020 006D 0061 0072 006B 0020 0028 0366 0076 002E 0032 0029 0368 0021
  Bidi_Class:     R    R    R    R    R    R    R    L    L    L    L    R    R    L    L    L    L    L    L    L    L    L    L    L    L    R
  Levels:         1    1    1    1    1    1    1    2    2    2    2    1    1    1    1    1    1    1    1    1    1    1    1    1    1    1
  Runs:        <R------------------------------L> <L---------------L> <L----------------------------------------------------------------------R>

Trace: Entering br_UBA_ResolveImplicitLevels [I1, I2]
Current State: 17
  Text:        0645 0627 0631 0652 0643 0020 2066 0031 2013 0033 0025 2069 0020 006D 0061 0072 006B 0020 0028 0366 0076 002E 0032 0029 0368 0021
  Bidi_Class:     R    R    R    R    R    R    R    L    L    L    L    R    R    L    L    L    L    L    L    L    L    L    L    L    L    R
  Levels:         1    1    1    1    1    1    1    2    2    2    2    1    1    2    2    2    2    2    2    2    2    2    2    2    2    1
  Runs:        <R------------------------------L> <L---------------L> <L----------------------------------------------------------------------R>

Trace: Entering br_UBA63_ResetWhitespaceLevels [L1]
Trace: Entering br_UBA_ReverseLevels [L2]
Current State: 19
  Text:        0645 0627 0631 0652 0643 0020 2066 0031 2013 0033 0025 2069 0020 006D 0061 0072 006B 0020 0028 0366 0076 002E 0032 0029 0368 0021
  Bidi_Class:     R    R    R    R    R    R    R    L    L    L    L    R    R    L    L    L    L    L    L    L    L    L    L    L    L    R
  Levels:         1    1    1    1    1    1    1    2    2    2    2    1    1    2    2    2    2    2    2    2    2    2    2    2    2    1
  Runs:        <R------------------------------L> <L---------------L> <L----------------------------------------------------------------------R>

  Order:      [25 13 14 15 16 17 18 19 20 21 22 23 24 12 11 7 8 9 10 6 5 4 3 2 1 0]

Paragraph Embedding Level: 1 Resolved Levels: [1 1 1 1 1 1 1 2 2 2 2 1 1 2 2 2 2 2 2 2 2 2 2 2 2 1] Resolved Order: [25 13 14 15 16 17 18 19 20 21 22 23 24 12 11 7 8 9 10 6 5 4 3 2 1 0]

Fonts and Display. If you don't have a good set of Unicode fonts (and modern browser), you may not be able to read some of the characters. Some suggested fonts that you can add for coverage are: Noto Fonts site, Unicode Fonts for Ancient Scripts, Large, multi-script Unicode fonts. See also: Unicode Display Problems.

Version 3.9; ICU version: 63.1; Unicode version: 11.0; Unicodeβ version: 12.0;