You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider this string of 128 Cyrillic letters а: аааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааа
Counting in UTF-8 bytes, it's 256 bytes long, and yet, if I replace byte check in the library with a simple length comparison, it works just fine:
Here's a string that has 64 Cyrillic а's and 64 Latin b's: ааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
Byte length would be 192, but character length is still 128, so it also works just fine:
I've also tested if other people see the presence with those strings, and they do.
The text was updated successfully, but these errors were encountered:
maximmax42
changed the title
String's max lengths should be not in bytes, but in characters
Strings' max lengths should be not in bytes, but in characters
Nov 17, 2022
Yeah, it was probably changed, and it's not mentioned anywhere. Old page for this API still says 128 bytes, but it also says image names can be no more than 32 bytes, which we know isn't true anymore.
An update: while button labels accept 32 any characters even if it's more than 32 bytes, putting a label with 32+ bytes still causes the whole presence to not show for others.
Consider this string of 128 Cyrillic letters а:
аааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааа
Counting in UTF-8 bytes, it's 256 bytes long, and yet, if I replace byte check in the library with a simple length comparison, it works just fine:
Here's a string that has 64 Cyrillic а's and 64 Latin b's:
ааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааааbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
Byte length would be 192, but character length is still 128, so it also works just fine:
I've also tested if other people see the presence with those strings, and they do.
Thought up of another test, Zalgo. Consider this string:
GitHub removes Zalgo text so here's a link to the string instead
206 bytes, 110 characters. Under 128 character, so it works:
The text was updated successfully, but these errors were encountered: