Closed autumnull closed 1 year ago
Ah, thanks! Indeed we just use len(someStringVar)
Instead we need to be using len([]rune(str))
, obviously the same should be done anywhere we're checking maximum length of user-inputtable strings that support non-ASCII.
Describe the bug with a clear and concise description of what the bug is.
Pinafore disagrees with toot length when non-ASCII characters are used
What's your GoToSocial Version?
v0.5.2
GoToSocial Arch
armv7 Binary
Browser version
Firefox 106.0.2 (64-bit)
What happened?
What you expected to happen?
How to reproduce it?
Make a post with lots of unicode in it near the character limit.
Anything else we need to know?
This is probably because GoToSocial is using bytes to measure toot length, and pinafore is using unicode chars. Just a hunch.