The character count disagrees with the one the form shows.
- Why:
- The two are counting different things. A field limited to 255 is usually counting UTF-8 bytes or UTF-16 units, not characters, so text with accents, emoji or CJK hits the limit well before the count suggests.
- Fix:
- Compare against the right number here: bytes for a database column or an API limit, UTF-16 units for anything doing JavaScript string arithmetic.