I mean character count. The unicode standard defines that as separate from and meaningfully different than grapheme clusters or codepoints.
The confusion you're relying on isn't real.
.
> Do you want to count zero-width characters?
Are they characters? Yes? Then I want to count them.
.
> More specifically what are you trying to do?
(narrows eyes)
I want to count characters. You're trying to make that sound confusing, but it really isn't.
I don't care if you think it's a "zero width" character. Zero width space is often not actually zero width in programmers' fonts, and almost every font has at least a dozen of these wrong.
I don't care about whatever other special moves you think you have, either.
This is actually very simple.
The unicode standard has something called a "character count." It is more work than the grapheme cluster count. The grapheme cluster count doesn't honor removals, replacements, substitutions, and it does something different in case folding.
The people trying super hard to show how technically apt they are at the difficulties in Unicode are just repeating things they've heard other people say.
The actual unicode standard makes this straightforward, and has these two terms separated already.
If you genuinely want to undersatnd this, read Unicode 14 chapter 2, "general structure." It's about 50 pages. You can probably get away with just reading 2.2.3.
It is three pages long.
It's called "characters, not glyphs," because 饾悶饾惎饾悶饾惂 饾惌饾悺饾悶 饾悮饾惍饾惌饾悺饾惃饾惈饾惉 饾惃饾悷 饾惌饾悺饾悶 饾悢饾惂饾悽饾悳饾惃饾悵饾悶 饾惉饾惌饾悮饾惂饾悵饾悮饾惈饾悵 饾惏饾悮饾惂饾惌 饾惄饾悶饾惃饾惄饾惀饾悶 饾惌饾惃 饾惉饾惌饾惃饾惄 饾惄饾惈饾悶饾惌饾悶饾惂饾悵饾悽饾惂饾悹 饾惌饾悺饾悮饾惌 "饾悳饾悺饾悮饾惈饾悮饾悳饾惌饾悶饾惈" 饾惁饾悶饾悮饾惂饾惉 饾悮饾惂饾惒饾惌饾悺饾悽饾惂饾悹 饾惃饾惌饾悺饾悶饾惈 饾惌饾悺饾悮饾惂 饾悮 饾悷饾惍饾惀饾惀饾惒 饾悮饾悹饾悹饾惈饾悶饾悹饾悮饾惌饾悶饾悵 饾惉饾悶饾惈饾悽饾悶饾惉.
The word "character" is well defined in Unicode. If you think it means anything other than point 2, 饾挌饾拹饾挅 饾拏饾挀饾拞 饾挃饾拪饾拵饾拺饾拲饾挌 饾拪饾拸饾拕饾拹饾挀饾挀饾拞饾拕饾挄, 饾拸饾拹饾挄 饾拺饾拲饾挌饾拪饾拸饾拡 饾拏 饾拝饾拞饾拞饾拺 饾挅饾拸饾拝饾拞饾挀饾挃饾挄饾拏饾拸饾拝饾拪饾拸饾拡 饾拹饾拠 饾拕饾拤饾拏饾挀饾拏饾拕饾挄饾拞饾挀 饾拞饾拸饾拕饾拹饾拝饾拪饾拸饾拡 饾挄饾拹饾拺饾拪饾拕饾挃.
All you need is on pages 15 and 16. Go ahead.
.
I want every choice to be made in accord with the Unicode standard. Every technicality you guys are trying to bring up was handled 20 years ago.
These words are actually well defined in the context of Unicode, and they're non-confusing in any other context. If you struggle with this, it is by choice.
Size means byte count. Length means character count. No, it doesn't matter if you incorrectly pull technical terminology like "grapheme clusters" and "code points," because I don't mean either of those. I mean 饾悳饾悺饾悮饾惈饾悮饾悳饾惌饾悶饾惈 饾悳饾惃饾惍饾惂饾惌.
If you have the sequence `capital a`, `zero width joiner`, `joining umlaut`, `special character`, `emoji face`, `skin color modifier`, you have:
1. Six codepoints 2. Three grapheme clusters 3. Four characters
Please wait until you can explain why before continuing to attempt to teach technicalities, friend. It doesn't work the way you claim.
This might help.
https://www.unicode.org/versions/Unicode14.0.0/UnicodeStanda...
Here, let's save you some time on some other technicalities that aren't.
1. If you write a unicode modifying character after something that cannot be modified - like adding an umlaut to a zero width joiner - then the umlaut will be considered a full character, but also discarded. Should it be counted? According to the Unicode standard, yes. 2. If you write a zero width anything, and it's a character, should it be counted? Yes. 3. If you write something that is a grapheme cluster, but your font or renderer doesn't support it, so it renders as two characters (by example, they added couple emoji in Unicode 10 and gay couples in Unicode 11, so phones that were released inbetween would render a two-man couple as two individual men.) Should that be counted as a single character as it's written, or a double character as it's rendered? Single. 4. If you're in a font that includes language variants - by example, Swiss German fancy fonts sometimes separate the S Tset into two distinct S characters that are flowed separately - should that be calculated as one character or two? Two, it turns out. 5. If a character pair is kerned into a single symbol, like an English cursive capital F to lower case E, should that be counted as one character or two? Two.
There's a whole chapter of these. If you really enjoy going through them, stop quizzing me and just read it.
These questions have been answered for literal decades. Just go read the standard already.