snapshot-labs / sx-monorepo

Snapshot monorepo
https://snapshot.box
MIT License
13 stars 11 forks source link

bug: disparity in chars count when using emoji #732

Open wa0x6e opened 1 week ago

wa0x6e commented 1 week ago

The chars count is counting special chars differently than the ajv validator

Screenshot 2024-09-10 at 01 05 54

wa0x6e commented 3 days ago

Solution https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter

Supported only in most recent browsers (e.g, firefox since 04-2024). May need to look at how ajv do it