Mastodon: Server- and client-side bio and display name count endlines and emoji combinations inconsistently

Created on 28 Jul 2017  路  3Comments  路  Source: tootsuite/mastodon

Hi!

When using UTF-8 chars (multi-byte ones, I assume), there's inconsistency in the "characters left" indication. I'm using mastodon.xyz which is in 1.4.7, problem still exists in 2.5.0rc1
When I submit the edited changes, the value that comes back it's smaller than the one that it's calculated by the frontend.


  • [X] I searched or browsed the repo鈥檚 other issues to ensure this is not a duplicate.
  • [ ] This bug happens on a tagged release and not on master (If you're a user, don't worry about this).
bug

All 3 comments

The issue is that server-side bio character counts endlines as two characters, whereas client-side count it as one character.

For example:

t
t
t
  • when editing, displays 155 characters left (client-side)
  • after saving, 153 characters left (server-side)
  • when editing again, 155 characters left (client-side)

This is particularly annoying when writing a bio with several endlines, because you can write a bio with the client-side code reporting that it fits into the character limit, but then rejected because the server-side code counted more characters.

Please rename the issue 芦Server- and client-side bio count endlines and emoji combinations inconsistently禄 or something like that.

The issue is the same with the display name, so I guess it鈥檚 the same code that must be fixed.

The OSes in play will likely have an influence on this...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

psychicteeth picture psychicteeth  路  3Comments

lauramichet picture lauramichet  路  3Comments

phryk picture phryk  路  3Comments

thomaskuntzz picture thomaskuntzz  路  3Comments

Gargron picture Gargron  路  3Comments