Can a combining character be used alone in Unicode?

后端 未结 2 1931
走了就别回头了
走了就别回头了 2021-01-15 05:45

Let\'s take COMBINING ACUTE ACCENT, for example. Its browser test page does include it alone in the page, but it reacts in a strange way: I can\'t select it with my mouse, a

2条回答
  •  一整个雨季
    2021-01-15 06:21

    Yes, a combining character alone is a valid Unicode string (even though its behaviour may be weird without a base character). Section 2.11 of the Unicode Standard emphasises this:

    In the Unicode Standard, all sequences of character codes are permitted.

    The presentation of such strings is described in D52:

    • There may be no such base character, such as when a combining character is at the start of text or follows a control or format character [...] In such cases, the combining characters are called isolated combining characters.

    • With isolated combining characters or when a process is unable to perform graphical combination, a process may present a combining character without graphical combination; that is, it may present it as if it were a base character.

    However, if you want to display a combining character by itself, it is recommended that you attach it to a no-break space base character:

    Nonspacing combining marks used by the Unicode Standard may be exhibited in apparent isolation by applying them to U+00A0 NO-BREAK SPACE. This convention might be employed, for example, when talking about the combining mark itself as a mark, rather than using it in its normal way in text (that is, applied as an accent to a base letter or in other combinations).

提交回复
热议问题