-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Community creation fails when ñ
char is present in the title and the length is 30 chars
#6032
Comments
This is because when dealing with utf8 characters we need to count runes instead of using length. import "fmt"
import "unicode/utf8"
fmt.Println("ñ", len("ñ"), utf8.RuneCountInString("ñ")) // ñ, 2, 1
fmt.Println("世界", len("世界"), utf8.RuneCountInString("世界")) // 世界, 6, 2 import std/unicode
echo "ñ ", "ñ".len, ",", "ñ".runeLen # ñ 2,1
echo "世界 ", "世界".len, ",", "世界".runeLen # 世界 6,2 We need to fix status-go and/or desktop to validate the length of a string with rune count functions in any place we use normal string lengths |
the specs specify that it needs to be alpha numeric and can't support encodings for security reasons or at least that was the case for public channels, need to analyze this |
confirmed: we wouldn't be supporting this due to impersonation risks |
@iurimatias, please
Are you referring to status-im/feature-specs#42?
How do characters like these enable that and alphanumeric ones alone don't? For those risks I understood we're implementing the mechanisms mentioned in status-im/feature-specs#42 (comment). Finally, will this limitation apply to display names of other entities like the community or channel, and to description as mentioned on the meeting about link sharing? If so, are you tracking it somewhere to address that? |
Description
ñ
char is considered as len 2 in some point and then the length of the community title exceeds the allowed one and it is not created.Error logged:
The text was updated successfully, but these errors were encountered: