big-list-of-naughty-strings icon indicating copy to clipboard operation
big-list-of-naughty-strings copied to clipboard

ZWJ Sequence

Open scribblemaniac opened this issue 7 years ago โ€ข 1 comments

I think it may be useful to include a recommended ZWJ sequence, especially one of the longer ones. For example, ๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ is ideally displayed as one 'family' character, but is actually 7 Unicode characters, and may fallback to display 4 characters for applications that don't directly support it. Inspired by: https://stackoverflow.com/questions/43618487/why-is-treated-so-strangely-in-swift-strings

scribblemaniac avatar Apr 27 '17 07:04 scribblemaniac

I know this is nitpicking, but can we be a little more precise here?

It's a sequence of 7 unicode code points, not characters. Those will be more than 7 Bytes (depends on encoding). Ideally they should be displayed as a single glyph, but the fallback is to display them as a sequence of 4 glyphs.

My browser (chromium) actually shows them as four glyphs, but I cannot select them individually, only as a unit. So it seems to implement the fallback very well.

Which also shows the use of such a ZWJ sequence: implementations should treat them as a single unit for text manipulation purposes, even if they consist of multiple glyphs, code points and bytes.

jfinkhaeuser avatar Apr 27 '17 07:04 jfinkhaeuser