Next: , Previous: Canonical combining class, Up: unictype.h


8.3 Bidirectional category

Every Unicode character or code point has a bidirectional category assigned to it.

The bidirectional category guides the bidirectional algorithm (http://www.unicode.org/reports/tr9/). The possible values are the following.

— Constant: int UC_BIDI_L

The bidirectional category for `Left-to-Right`” characters.

— Constant: int UC_BIDI_LRE

The bidirectional category for “Left-to-Right Embedding” characters.

— Constant: int UC_BIDI_LRO

The bidirectional category for “Left-to-Right Override” characters.

— Constant: int UC_BIDI_R

The bidirectional category for “Right-to-Left” characters.

— Constant: int UC_BIDI_AL

The bidirectional category for “Right-to-Left Arabic” characters.

— Constant: int UC_BIDI_RLE

The bidirectional category for “Right-to-Left Embedding” characters.

— Constant: int UC_BIDI_RLO

The bidirectional category for “Right-to-Left Override” characters.

— Constant: int UC_BIDI_PDF

The bidirectional category for “Pop Directional Format” characters.

— Constant: int UC_BIDI_EN

The bidirectional category for “European Number” characters.

— Constant: int UC_BIDI_ES

The bidirectional category for “European Number Separator” characters.

— Constant: int UC_BIDI_ET

The bidirectional category for “European Number Terminator” characters.

— Constant: int UC_BIDI_AN

The bidirectional category for “Arabic Number” characters.

— Constant: int UC_BIDI_CS

The bidirectional category for “Common Number Separator” characters.

— Constant: int UC_BIDI_NSM

The bidirectional category for “Non-Spacing Mark” characters.

— Constant: int UC_BIDI_BN

The bidirectional category for “Boundary Neutral” characters.

— Constant: int UC_BIDI_B

The bidirectional category for “Paragraph Separator” characters.

— Constant: int UC_BIDI_S

The bidirectional category for “Segment Separator” characters.

— Constant: int UC_BIDI_WS

The bidirectional category for “Whitespace” characters.

— Constant: int UC_BIDI_ON

The bidirectional category for “Other Neutral” characters.

The following functions implement the association between a bidirectional category and its name.

— Function: const char * uc_bidi_category_name (int category)

Returns the name of a bidirectional category.

— Function: int uc_bidi_category_byname (const char *category_name)

Returns the bidirectional category given by name, e.g. "LRE".

The following functions view bidirectional categories as sets of Unicode characters.

— Function: int uc_bidi_category (ucs4_t uc)

Returns the bidirectional category of a Unicode character.

— Function: bool uc_is_bidi_category (ucs4_t uc, int category)

Tests whether a Unicode character belongs to a given bidirectional category.