9

A valid sequence of code-points can begin with one or more combining mark, which form a grapheme cluster that has no base glyph.

I'm unsure how that should be handled, if at all.

For example, consider a string consisting solely of an accent, with no "letter" attached. Is that grapheme cluster valid? should it be "sanitized" somehow, for example by prefixing it with a U+FFFD?

More specifically, I am worried about handling string concatenation. If I append that "string consisting solely in an accent" to another string, not necessarily I want the accent to be part of the other string's last grapheme.

Does Unicode specify anything about how to handle these cases?

2
  • No idea if Unicode says anything on the matter, but I guess this would be related to what you consider Strings, sequences of characters.. or bytes? If bytes then perhaps you'd leave it and include it in concatenation, if characters then I would sanitize it since it's not a character.
    – xtratic
    Commented Jun 17, 2020 at 19:41
  • 2
    Have you tried looking through the official Unicode publications at unicode.org/main.html? Commented Jun 18, 2020 at 6:22

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.