プロパティ

結合クラス

正規分解時の結合記号の順序を制御する数値(0〜254)で、どの結合記号を並べ替えられるかを決定します。

· Updated

What Is the Canonical Combining Class?

The Canonical Combining Class (CCC) is an integer property (range 0–240) assigned to every Unicode character. It specifies how combining marks—characters that attach to a preceding base character—are reordered relative to one another during Unicode Normalization. Most base characters and non-combining characters have CCC = 0 (Non-combining). Combining diacritical marks carry non-zero values that determine their stacking order.

The core rule is the Canonical Ordering Algorithm: when two adjacent combining marks both have non-zero CCC values, the one with the lower value is placed closer to the base character in the normalized form. Two marks with equal non-zero CCC values are considered blocked and their relative order is preserved.

CCC in Practice

Consider the letter a with two diacritics: a cedilla (CCC=202) and an ogonek (CCC=202 as well). Because they share the same CCC, their order is kept stable. But an above-combining mark like combining breve (CCC=228) and a below-combining mark like combining macron below (CCC=220) would sort by their values during normalization, placing the CCC=220 mark before the CCC=228 mark in NFD.

import unicodedata

marks = [
    ("\u0300", "COMBINING GRAVE ACCENT"),        # CCC=230
    ("\u0327", "COMBINING CEDILLA"),              # CCC=202
    ("\u0328", "COMBINING OGONEK"),               # CCC=202
    ("\u0331", "COMBINING MACRON BELOW"),         # CCC=220
    ("\u0952", "DEVANAGARI STRESS SIGN ANUDATTA"),# CCC=220
]

for char, name in marks:
    ccc = unicodedata.combining(char)
    print(f"  CCC={ccc:3}  {name}")

# CCC=230  COMBINING GRAVE ACCENT
# CCC=202  COMBINING CEDILLA
# CCC=202  COMBINING OGONEK
# CCC=220  COMBINING MACRON BELOW
# CCC=220  DEVANAGARI STRESS SIGN ANUDATTA

# Normalization puts the sequence into canonical order:
text = "a\u0328\u0300"   # a + ogonek (CCC=202) + grave (CCC=230)
nfd = unicodedata.normalize("NFD", text)
# NFD preserves order here because 202 < 230, ogonek stays first
print([f"U+{ord(c):04X}" for c in nfd])
# ['U+0061', 'U+0328', 'U+0300']

Named CCC Values

A few CCC values have names defined in the standard: 0 (Not_Reordered), 1 (Overlay), 6 (Han_Reading), 7 (Nukta), 8 (Kana_Voicing), 9 (Virama), and 10 (CCC10) through 199 (CCC199) for specific positioning classes. Values 200–240 are used for particular combining categories such as Below (CCC=220), Above (CCC=230), and Double_Below (CCC=233).

Quick Facts

Property Value
Unicode property name Canonical_Combining_Class
Short alias ccc
Range 0–240 (not all values used)
Value 0 Base characters, non-combining
Python function unicodedata.combining(char) → integer
Key use NFD/NFC canonical ordering during normalization
Spec reference Unicode Standard Section 3.11, UAX #15

関連用語

プロパティ のその他の用語

Age プロパティ

文字が最初に割り当てられたUnicodeバージョン。システムやソフトウェアバージョン間での文字サポートを判断するのに役立ちます。

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 …

ケースマッピング

文字を大文字・小文字・タイトルケースに変換するルール。ロケール依存の場合があり(トルコ語のI問題)、1対多のマッピングもあります(ß → SS)。

スクリプト

文字が属する文字体系(例:ラテン、キリル、漢字)。Unicode 16.0は168個のスクリプトを定義し、Scriptプロパティはセキュリティと混在スクリプト検出に重要です。

デフォルト無視文字

サポートしていないプロセスで目に見える効果なく無視できる文字で、異体字セレクター・ゼロ幅文字・言語タグなどが含まれます。

ブロック

名前付きの連続したコードポイント範囲(例:基本ラテン = U+0000〜U+007F)。Unicode 16.0は336個のブロックを定義し、すべてのコードポイントはちょうど1つのブロックに属します。

ミラープロパティ

RTLコンテキストでグリフを水平に反転すべき文字。例:( → )、[ → ]、{ → }、« → »。

一般カテゴリー

すべてのコードポイントを30個のカテゴリ(Lu・Ll・Nd・Soなど)の1つに分類する体系で、7つの主要クラス(文字・記号・数字・句読点・記号・区切り・その他)にグループ化されています。