Line Break - Surrogate

Unicode Version 18.0

Surrogate is a special line break class assigned to code points in the range U+D800 to U+DFFF, which are reserved for UTF-16 surrogate pairs. These code points never appear in valid Unicode text on their own; they only exist as half of a pair to encode supplementary characters. For line breaking, a surrogate alone cannot start or end a line, and it does not permit breaks before, after, or between itself and adjacent surrogates. Instead, the line breaking algorithm treats a full surrogate pair as an indivisible unit, effectively requiring that both halves stay together on the same line. This prevents malformed text from causing visual fragmentation, ensuring that any break occurs only at boundaries outside the pair, and that a lone surrogate does not create an unintended breaking opportunity. In practice, this value ensures robust fallback behavior when encountering corrupted or incomplete data.

0 results