DEV Community

Discussion on: Quick and easy way of counting UTF-8 characters in Javascript

Collapse
galdolber profile image
Gal Dolber

I think is because punctuation symbols are separate unicode characters that are collapsed into the first preceding non-Mark character.

Example: ד ָ דָ

So if you want to count the visible characters, you need to account for the marks.