Unicode character property

From HandWiki
Short description: Unicode code-point property names

The Unicode Standard assigns various properties to each Unicode character and code point.[1][2]

The properties can be used to handle characters (code points) in processes, like in line-breaking, script direction right-to-left or applying controls. Some "character properties" are also defined for code points that have no character assigned and code points that are labeled like "<not a character>". The character properties are described in Standard Annex #44.[2]

Properties have levels of forcefulness: normative, informative, contributory, or provisional. For simplicity of specification, a character property can be assigned by specifying a continuous range of code points that have the same property.[3]

Semantic elements

Properties are displayed [4][failed verification (See discussion.)] in the following order:

[code];[name];[gc];[cc];[bc];[decomposition];;;[nv];[bm];[alias];;;;
  • 'alias' = corrected name
  • 'bc' = bidi (bidirectional) category [L, R etc]
  • 'bm' = bidi mirrored [N or Y]
  • 'cc' = combining class [position of diacritic]
  • decomposition = letter + diacritic, ligature X Y, superscript X, font X, initial X, medial X, final X, isolated X, vertical X, etc.
  • 'gc' = general category [letter, symbol, digit, punctuation, case behavior, etc.]
  • 'nv' = numeric value [of a digit]

Name

A Unicode character is assigned a unique Name (na).[1] The name is composed of uppercase letters A–Z, digits 0–9, hyphen-minus (-) and space ( ). Some sequences are excluded: names beginning with a space or hyphen, names ending with a space or hyphen, repeated spaces or hyphens, and space after hyphen are not allowed. The name is guaranteed to be unique within Unicode, and can be used to identify a code point and its character. Ideographic characters, of which there are tens of thousands, are named in the pattern "cjk unified ideograph-hhhh". For example, U+4E00 CJK UNIFIED IDEOGRAPH-4E00. Formatting characters are named too: U+00A0   NO-BREAK SPACE.

The following classes of code point do not have a Name (na=""): Controls (General Category: Cc), Private use (Co), Surrogate (Cs), Non-characters (Cn) and Reserved (Cn). They may be referenced, informally, by a generic or specific meta-name, called "Code Point Labels": <control>, <control-0088>, <reserved>, <noncharacter-hhhh>, <private-use-hhhh>, or <surrogate>. Since these labels contain <>-brackets, they can never appear as a Name, which prevents confusion.

Version 1.0 names

In version 2.0 of Unicode, many names were changed. From then on the rule "a name will never change" came into effect, including the strict (normative) use of alias names. Disused version 1.0-names were moved to the property Alias, to provide some backward compatibility.

Character name alias

Main page: Unicode alias names and abbreviations

Starting from Unicode version 2.0, the published name for a code point will never change. Therefore, in the event of a character name being misspelled or if the character name is completely wrong or seriously misleading, a formal Character Name Alias may be assigned to the character, and this alias may be used by applications instead of the actual defective character name.[1] For example, U+FE18 PRESENTATION FORM FOR VERTICAL RIGHT WHITE LENTICULAR BRAKCET has the character name alias "PRESENTATION FORM FOR VERTICAL RIGHT WHITE LENTICULAR BRACKET" in order to mitigate the misspelling of "bracket" as "brakcet" in the actual character name; U+A015 YI SYLLABLE WU has the character name alias "YI SYLLABLE ITERATION MARK" because contrary to the character name it does not have a fixed syllabic value.

In addition to character name aliases which are corrections to defective character names, some characters are assigned aliases which are alternative names or abbreviations. Five types of character name aliases are defined in the Unicode Standard:

  • Correction: corrections for misspelled or seriously incorrect character names;
  • Control: ISO 6429 names for C0 and C1 control functions (which are not assigned character names in the Unicode Standard);
  • Alternate: alternative names for some format characters (only U+FEFF "ZERO WIDTH NO-BREAK SPACE" which has the alias "BYTE ORDER MARK");
  • Figment: Documented labels for some C1 control code functions which are not actual names in any standard;
  • Abbreviation: Abbreviations or acronyms for control codes, format characters, spaces, and variation selectors.

All formal character name aliases follow the rules for permissible character names, and are guaranteed to be unique within both the character name alias and the character name namespaces (for this reason, the ISO 6429 name "BELL" is not defined as an alias for U+0007 because U+1F514 is named "BELL").[1]

As of Unicode version 12.1, twenty-eight formal character name aliases are defined as corrections for defective character names.[5] These are listed below.

Apart from these normative names, informal names may be shown in the Unicode code charts. These are other commonly used names for a character, and do not have the same character restriction. These informal names are not guaranteed to be unique, and may be changed or removed in later versions of the standard.

General Category

Each code point is assigned a value for General Category. This is one of the character properties that are also defined for unassigned code points and code points that are defined "not a character".

Punctuation

Characters have separate properties to denote they are a punctuation character. The properties all have a Yes/No values: Dash, Quotation_Mark, Sentence_Terminal, Terminal_Punctuation.


Whitespace

Main page: Whitespace character

Whitespace is a commonly used concept for a typographic effect. Basically it covers invisible characters that have a spacing effect in rendered text. It includes spaces, tabs, and new line formatting controls. In Unicode, such a character has the property set "WSpace=yes". In version Template:Unicode version, there are 25 whitespace characters.

Other general characteristics

Ideographic, alphabetic, noncharacter.

Combining class

Some common codes:

0 = spacing letter, symbol or modifier (e.g. a, (, ʰ)
1 = overlay
6 = Han reading (CJK diacritic reading marks)
7 = nukta (diacritic nukta in Brahmic scripts)
8 = kana voicing marks
9 = virama

10–199 = various fixed-position classes

Marks which attach to the base letter:

200 = attached at bottom left
202 = attached directly below (e.g. cedilla on ç)
204 = attached at bottom right
208 = attached to left
210 = attached to right
212 = attached to top left
214 = attached directly above
216 = attached at top right

Marks which do not attach to the base letter:

218 = bottom left
220 = directly below (e.g. ring on n̥)
222 = below right
224 = left
226 = right
228 = above left
230 = above (e.g. acute accent on á)
232 = above right
233 = double below (subtends two bases)
234 = double above (extends two bases)
240 = iota subscript (only that Greek diacritic)

Display-related properties

Shaping, width.

Bidirectional writing

Six character properties pertain to bi-directional writing: Bidi_Class, Bidi_Control, Bidi_Mirrored, Bidi_Mirroring_Glyph, Bidi_Paired_Bracket and Bidi_Paired_Bracket_Type.

One of Unicode's major features is support of bi-directional (Bidi) text display right-to-left (R-to-L) and left-to-right (L-to-R). The Unicode Bidirectional Algorithm UAX9[6] describes the process of presenting text with altering script directions. For example, it enables a Hebrew quote in an English text. The Bidi_Character_Type marks a character's behaviour in directional writing. To override a direction, Unicode has defined special formatting control characters (Bidi-Controls). These characters can enforce a direction, and by definition only affect bi-directional writing.

Each code point has a property called Bidi_Class. It defines its behaviour in a bidirectional text as interpreted by the algorithm:

v · d · e Bidirectional character type (Unicode character property Bidi_Class)[1]
Type[2] Description Strength Directionality General scope Bidi_Control character[3]
L Left-to-Right 01 Strong L-to-R Most alphabetic and syllabic characters, Chinese characters, non-European or non-Arabic digits, LRM character, ... 8206 U+200E LEFT-TO-RIGHT MARK (LRM)


R Right-to-Left 02 Strong R-to-L Adlam, Hebrew, Mandaic, Mende Kikakui, N'Ko, Samaritan, ancient scripts like Kharoshthi and Nabataean, RLM character, ... 8207 U+200F RIGHT-TO-LEFT MARK (RLM)


AL Arabic Letter 03 Strong R-to-L Arabic, Hanifi Rohingya, Sogdian, Syriac, and Thaana alphabets, and most punctuation specific to those scripts, ALM character, ... 1564 U+061C ARABIC LETTER MARK (ALM)


EN European Number 04 Weak European digits, Eastern Arabic-Indic digits, Coptic epact numbers, ...
ES European Separator 05 Weak plus sign, minus sign, ...
ET European Number Terminator 06 Weak degree sign, currency symbols, ...
AN Arabic Number 07 Weak Arabic-Indic digits, Arabic decimal and thousands separators, Rumi digits, Hanifi Rohingya digits, ...
CS Common Number Separator 08 Weak colon, comma, full stop, no-break space, ...
NSM Nonspacing Mark 09 Weak Characters in General Categories Mark, nonspacing, and Mark, enclosing (Mn, Me)
BN Boundary Neutral 10 Weak Default ignorables, non-characters, control characters other than those explicitly given other types
B Paragraph Separator 11 Neutral paragraph separator, appropriate Newline Functions, higher-level protocol paragraph determination
S Segment Separator 12 Neutral Tabs
WS Whitespace 13 Neutral space, figure space, line separator, form feed, General Punctuation block spaces (smaller set than the Unicode whitespace list)
ON Other Neutrals 14 Neutral All other characters, including object replacement character
LRE Left-to-Right Embedding 15 Explicit L-to-R LRE character only 8234 U+202A LEFT-TO-RIGHT EMBEDDING (LRE)


LRO Left-to-Right Override 16 Explicit L-to-R LRO character only 8237 U+202D LEFT-TO-RIGHT OVERRIDE (LRO)


RLE Right-to-Left Embedding 17 Explicit R-to-L RLE character only 8235 U+202B RIGHT-TO-LEFT EMBEDDING (RLE)


RLO Right-to-Left Override 18 Explicit R-to-L RLO character only 8238 U+202E RIGHT-TO-LEFT OVERRIDE (RLO)


PDF Pop Directional Format 19 Explicit PDF character only 8236 U+202C POP DIRECTIONAL FORMATTING (PDF)


LRI Left-to-Right Isolate 20 Explicit L-to-R LRI character only 8294 U+2066 LEFT-TO-RIGHT ISOLATE (LRI)


RLI Right-to-Left Isolate 21 Explicit R-to-L RLI character only 8295 U+2067 RIGHT-TO-LEFT ISOLATE (RLI)


FSI First Strong Isolate 22 Explicit FSI character only 8296 U+2068 FIRST STRONG ISOLATE (FSI)


PDI Pop Directional Isolate 23 Explicit PDI character only 8297 U+2069 POP DIRECTIONAL ISOLATE (PDI)


Notes
1.^ Unicode Bidirectional Algorithm (UAX#9), As of Unicode version 12.0
2.^ Possible Bidirectional character types for character property: Bidi_Class or 'type'
3.^ Bidi_Control characters: Twelve Bidi_Control formatting characters are defined. They are invisible, and have no effect apart from directionality. Nine of them have a unique, overruling BiDi-type that is used by the algorithm. Their type is also their acronym (e.g. character 'LRE' has BiDi type 'LRE').

In normal situations, the algorithm can determine the direction of a text by this character property. To control more complex Bidi situations, e.g. when an English text has a Hebrew quote, extra options are added to Unicode. Twelve characters have the property Bidi_Control=Yes: ALM, FSI, LRE, LRI, LRM, LRO, PDF, PDI, RLE, RLI, RLM and RLO as named in the table. These are invisible formatting control characters, only used by the algorithm and with no effect outside of bidirectional formatting.[6] Despite the name, they are formatting characters, not control characters, and have General category "Other, format (Cf)" in the Unicode definition.

Basically, the algorithm determines a sequence of characters with the same strong direction type (R-to-L or L-to-R), taking in account an overruling by the special Bidi-controls. Number strings (Weak types) are assigned a direction according to their strong environment, as are Neutral characters. Finally, the characters are displayed per a string's direction.

Two character properties are relevant to determining a mirror image of a glyph in bidirectional text: Bidi_Mirrored=Yes indicates that the glyph should be mirrored when written R-to-L. The property Bidi_Mirroring_Glyph=U+hhhh can then point to the mirrored character. For example, brackets "()" are mirrored this way. Shaping cursive scripts such as Arabic, and mirroring glyphs that have a direction, is not part of the algorithm.

Casing

The Case value is Normative in Unicode. It pertains to those scripts with uppercase (aka capital, majuscule) and the lowercase (aka small, minuscule) letters. Case-difference occurs in Adlam, Armenian, Cherokee, Coptic, Cyrillic, Deseret, Glagolitic, Greek, Khutsuri and Mkhedruli Georgian, Latin, Medefaidrin, Old Hungarian, Osage, Vithkuqi and Warang Citi scripts.

(upper, lower, title, folding—both simple and full)

Numeric values and types

Decimal

Characters are classified with a Numeric type.[1] Characters such as fractions, subscripts, superscripts, Roman numerals, currency numerators, encircled numbers, and script-specific digits are type Numeric. They have a numeric value that can be decimal, including zero and negatives, or a vulgar fraction. If there is not such a value, as with most of the characters, the numeric type is "None".

The characters that do have a numeric value are separated in three groups: Decimal (De), Digit (Di) and Numeric (Nu, i.e. all other). "Decimal" means the character is a straight decimal digit. Only characters that are part of a contiguous encoded range 0..9 have numeric type Decimal. Other digits, like superscripts, have numeric type Digit. All numeric characters like fractions and Roman numerals end up with the type "Numeric". The intended effect is that a simple parser can use these decimal numeric values, without being distracted by say a numeric superscript or a fraction. Eighty-three CJK Ideographs that represent a number, including those used for accounting, are typed Numeric.

On the other hand, characters that could have a numeric value as a second meaning are still marked Numeric type "None", and have no numeric value (""). E.g. Latin letters can be used in paragraph numbering like "II.A.1.b", but the letters "I", "A" and "b" are not numeric (type "None") and have no numeric value.

Hexadecimal digits

Hexadecimal characters are those in the series with hexadecimal values 0...9ABCDEF (sixteen characters, decimal value 0–15). The character property Hex_Digit is set to Yes when a character is in such a series:


Forty-four characters are marked as Hex_Digit. The ones in the Basic Latin block are also marked as ASCII_Hex_Digit.

Unicode has no separate characters for hexadecimal values. A consequence is, that when using regular characters it is not possible to determine whether hexadecimal value is intended, or even whether a value is intended at all. That should be determined at a higher level, e.g. by prepending "0x" to a hexadecimal number or by context. The only feature is that Unicode can note that a sequence can or can not be a hexadecimal value.

Block

Main page: Unicode block

A block is a uniquely named, contiguous range of code points. It is identified by its first and last code point. Blocks do not overlap. A block may contain code points that are reserved, not-assigned, etc. Each character that is assigned, has a single "block name" value from the 328 names assigned as of Unicode version Template:Unicode version. Unassigned code points outside of an existing block have the default value "No_block".

Script

Each assigned character can have a single value for its "Script" property, signifying to which script it belongs.[7] The value is a four-letter code in the range Aaaa-Zzzz, as available in ISO 15924, which is mapped to a writing system. Apart from when describing the background and usage of a script, Unicode does not use a connection between a script and languages that use that script. So "Hebrew" refers to the Hebrew script, not to the Hebrew language.

The special code Zyyy for "Common" allows a single value for a character that is used in multiple scripts. The code Zinh "Inherited script", used for combining characters and certain other special-purpose code points, indicates that a character "inherits" its script identity from the character with which it is combined. (Unicode formerly used the private code Qaai for this purpose.) The code Zzzz "Unknown" is used for all characters that do not belong to a script (i.e. the default value), such as symbols and formatting characters. Overall, characters of a single script can be scattered over multiple blocks, like Latin characters. And the other way around too: multiple scripts can be present is a single block, e.g. block Letterlike Symbols contains characters from the Latin, Greek and Common scripts.

When the Script is "" (blank), according to Unicode the character does not belong to a script. This pertains to symbols, because the existing ISO script codes "Zmth" (Mathematical notation), "Zsym" (Symbol), and "Zsye" (Symbol, emoji variant) are not used in Unicode. The "Script" property is also blank for code points that are not a typographic character like controls, substitutes, and private use code points.

If there is a specific script alias name in ISO 15924, it is used in the character name: U+0041 A LATIN CAPITAL LETTER A, and U+05D0 א HEBREW LETTER ALEF.

Normalization properties

Decompositions, decomposition type, canonical combining class, composition exclusions, and more.

Age

Age is the version of the Standard in which the code point was first designated. The version number is shortened to the numbering major.minor, although there more detailed version numbers are used: versions 4.0.0 and 4.0.1 both are named 4.0 as Age. Given the releases, Age can be from the range: 1.1, 2.0, 2.1, 3.0, 3.1, 3.2, 4.0, 4.1, 5.0, 5.1, 5.2, 6.0, 6.1, 6.2, 6.3, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 12.1, 13.0, 14.0, 15.0, and 15.1.[8] The long values for Age begin in a V and use an underscore instead of a dot: V1_1, for example.[2] Codepoints without a specifically assigned age value have the value "NA", with the long form "Unassigned".

Deprecated

Once a character has been defined, it will not be removed or reassigned.[9] However, a character may be deprecated, meaning its "use is strongly discouraged".[10] As of Unicode version Template:Unicode version, the following fifteen characters are deprecated:[11]

Deprecated characters in Unicode
Codepoint Character name Recommended alternative Remarks
U+0149 LATIN SMALL LETTER N PRECEDED BY APOSTROPHE U+02BC U+006E ʼn
U+0673 ARABIC LETTER ALEF WITH WAVY HAMZA BELOW U+0627 U+065F اٟ
U+0F77 TIBETAN VOWEL SIGN VOCALIC RR U+0FB2 U+0F81[lower-alpha 1] ྲཱྀ
U+0F79 TIBETAN VOWEL SIGN VOCALIC LL U+0FB3 U+0F81[lower-alpha 1] ླཱྀ
U+17A3 KHMER INDEPENDENT VOWEL QAQ U+17A2
U+17A4 KHMER INDEPENDENT VOWEL QAA U+17A2 U+17B6 អា
U+206A INHIBIT SYMMETRIC SWAPPING None[lower-alpha 2]
U+206B ACTIVATE SYMMETRIC SWAPPING None[lower-alpha 2]
U+206C INHIBIT ARABIC FORM SHAPING None[lower-alpha 2]
U+206D ACTIVATE ARABIC FORM SHAPING None[lower-alpha 2]
U+206E NATIONAL DIGIT SHAPES None[lower-alpha 2]
U+206F NOMINAL DIGIT SHAPES None[lower-alpha 2]
U+2329 LEFT-POINTING ANGLE BRACKET U+3008[lower-alpha 3] U+27E8 MATHEMATICAL LEFT ANGLE BRACKET is recommended for mathematical and other technical use
U+232A RIGHT-POINTING ANGLE BRACKET U+3009[lower-alpha 3] U+27E9 MATHEMATICAL RIGHT ANGLE BRACKET is recommended for mathematical and other technical use
U+E0001 LANGUAGE TAG None[lower-alpha 4]
  1. 1.0 1.1 U+0F81 TIBETAN VOWEL SIGN REVERSED II is itself discouraged (but not deprecated), and is canonically equivalent to the sequence U+0F71 U+0F80.
  2. 2.0 2.1 2.2 2.3 2.4 2.5 Rather than using this control character to indicate the appropriate appearance for text, appropriate character codes with the correct state should be used.[12]
  3. 3.0 3.1 This alternative character is in the CJK Symbols and Punctuation block, and is not suitable for mathematical or technical use
  4. Alternative means of language tagging should be used instead.[13]

Boundaries

The Unicode Standard specifies the following boundary-related properties:

  • Grapheme cluster
  • Word
  • Line
  • Sentence

Alias name

Main page: Unicode alias names and abbreviationsUnicode can assign alias names to code points. These names are unique over all names (including regular ones), so they can be used as identifier. There are five possible reasons to add an alias:
1. Abbreviation
Commonly occurring abbreviations or acronyms for control codes, format characters, spaces, and variation selectors.
For example, U+00A0   NO-BREAK SPACE has alias NBSP. Sometimes presented in a box: Template:Unicode alias/abbrbox.
2. Control
ISO 6429 names for C0 and C1 control functions and similar commonly occurring names, are added as an alias to the character.
For example, U+0008 <control-0008> has alias BACKSPACE.
3. Correction
This is a correction for a "serious problem" in the primary character name, usually an error.
For example, U+2118 SCRIPT CAPITAL P is actually a lowercase p, and so is given alias name WEIERSTRASS ELLIPTIC FUNCTION: "actually this has the form of a lowercase calligraphic p, despite its name, and through the alias the correct spelling is added." In descriptions, with preceding symbol ※.
4. Alternate
A widely used alternate name for a character.
Example: U+FEFF ZERO WIDTH NO-BREAK SPACE has alternate BYTE ORDER MARK.
5. Figment
Several documented labels for C1 control code points which were never actually approved in any standard (figment = feigned, in fiction).
For example, U+0099 <control-0099> has figment alias SINGLE GRAPHIC CHARACTER INTRODUCER. This name is an architectural concept from early drafts of ISO/IEC 10646-1, but it was never approved and standardized.

External links

References

  1. 1.0 1.1 1.2 1.3 1.4 "Character Properties". The Unicode Standard Version 15. Mountain View, CA: The Unicode Consortium. September 2022. ISBN 978-1-936213-32-0. https://www.unicode.org/versions/Unicode15.0.0/ch04.pdf. Retrieved 2022-09-16. 
  2. 2.0 2.1 2.2 "Unicode Standard Annex #44: Unicode Character Database". 2017-06-14. https://www.unicode.org/reports/tr44/. 
  3. "Unicode Standard Annex #44: Unicode Character Database, 4.2.3 Code Point Ranges". 2022-09-02. https://www.unicode.org/reports/tr44/#Code_Point_Ranges. 
  4. "UCD: Unicode Data". https://www.unicode.org/Public/UCD/latest/ucd/UnicodeData.txt. 
  5. "UCD: Name Aliases". Unicode Character Database. Unicode Consortium. 2019-03-08. https://www.unicode.org/Public/UCD/latest/ucd/NameAliases.txt. 
  6. 6.0 6.1 "Unicode Standard Annex #9: Unicode Bidirectional Algorithm". The Unicode Standard. 2017-05-14. https://www.unicode.org/reports/tr9/. 
  7. "Unicode Standard Annex #24: Unicode Script Property". The Unicode Standard. 2015-06-01. https://www.unicode.org/reports/tr24/. 
  8. "UCD: Derived Age". Unicode Character Database. Unicode Consortium. 2023-07-28. https://www.unicode.org/Public/UCD/latest/ucd/DerivedAge.txt. 
  9. "Unicode Character Encoding Stability Policies". Unicode Consortium. 2017-06-23. https://www.unicode.org/policies/stability_policy.html. "Once a character is encoded, it will not be moved or removed." 
  10. The Unicode Standard, Version 15.0. Mountain View: Unicode Consortium. 2022-09-13. ISBN 978-1-936213-32-0. https://www.unicode.org/versions/Unicode15.0.0/. Retrieved 2022-09-16. 
  11. "PropList-15.1.0.txt". Unicode Consortium. 2023-08-01. https://www.unicode.org/Public/15.1.0/ucd/PropList.txt. 
  12. "Chapter 23.3: Deprecated Format Characters". The Unicode Standard, Version 13.0. Mountain View: Unicode Consortium. 2020-03-10. ISBN 978-1-936213-26-9. https://www.unicode.org/versions/Unicode13.0.0/ch23.pdf#G19593. Retrieved 2021-07-25. 
  13. The Unicode Standard, Version 13.0. Mountain View: Unicode Consortium. 2020-03-10. ISBN 978-1-936213-26-9. https://www.unicode.org/versions/Unicode13.0.0/. Retrieved 2021-07-25.