Summary
I’m trying to port all users in out system to the chat server, having issues with usernames with unicode characters such as Chinese.
Steps to reproduce
After getting the token, calling for the POST users where many usernames are in their native language.
Expected behavior username with unicode characters being totally ok
Observed behavior
400 Bad Request
“model.user.is_valid.username.app_error”
“Il nome utente deve iniziare con una lettera e contenere da 3 a 22 caratteri inclusi numeri, lettere minuscole e i simboli ".","-" e "_".”
Unfortunately as of now, Mattermost does not support unicode characters in usernames, you can use unicode characters in the Display Name and Nickname attributes for a user account, though, which is probably not as good as expected but it’s everything that is available at the moment. Sorry for not having better news.
I’m also not aware of any functionality like this. You can, however, host your own application which will set the cookies for the user required for accepting an auto-login on the client. There have been some threads around this topic here in the past, one would be here.
Doesn’t look pretty, but I’m not sure if I fully understand the scope of your request here, but then again, I’m one of those ignorant ASCII-natives who never had troubles with their character set (the only characters I’m struggling with are the german umlauts ä, ö, ü, etc., but you can easily work around that by using ae for ä, oe for ö, etc.).
Not sure if such a trick would also work for you or if there are latin equivalents of the usernames you’re trying to use here. I can image that having unicode username support would be beneficial for multiple countries with non-latin character sets, but obviously this is still not a standard procedure nowadays even in modern software solutions like Mattermost.
I’m pretty sure that someday the default will change, the more the libraries and infrastructure grow and get more mature, but as a sysadmin I can tell you like 200 top-of-the-notch software components widely used and enterprise messaging and infratructure solutions that are not even supporting extended ascii characters for things like usernames and e-mail addresses, so I’m afraid it’s still a long way until we can use such characters in all places without having to think about that.
@agriesser For example this is one of out students full name but also login username:
谭钦颖
The student is often underage, so there’s no email available here either(from where to extract a username) and a Pinyin version(latin names) of the fullname isn’t available always either.
In this context we are totally stuck and only left with the IDs generated by the database that are ASCII like those in the image.
Let me tell you that given that I’m a programmer, it’s been years that Unicode is totally feasible in usernames and URLs, the limit is the other parties implementations, which prefer to stick to ASCII and discard the inclusiveness of Unicode, imo.
The reality unfortunately is, that it’s not working on most of the systems although it should. I’m experiencing issues with non-latin characters regularly, so although it should be easy to use and should be standard everywhere, it really isn’t :-/
Nevertheless, I’ve raised this topic with Mattermost R&D and it is being in discussion now to look into the possible impact. I’ve linked this ticket there for reference.
Nice to know, thanks for the effort. The usual gotchas for me in the Unicode space are those different kinds of " " empty spaces(easy regex), other than that, our systems have been build supporting Unicode everywhere