Currently, usernames can only consist of ASCII characters, but this poses a problem for email login. SMTPUTF8 allows email addresses with non-ASCII characters in the local part that cannot be converted using Punnycode or similar methods.
To protect existing systems, the default behavior for username validation could remain unchanged, and an opt-in option could allow usernames to be non-ASCII-compliant (as well as -bad-name in Linux user management).
My use case:
I want to switch from OneDrive to Nextcloud at my company, and as an IT service provider, I also want to help other companies migrate to Nextcloud, but because of this username restriction, that’s not an option for me right now (we already use email addresses with non-ASCII characters).
Update:
Patch: unicode-benutzernamen.patch
ótzï@test-System-Product-Name:~/Schreibtisch/nextcloud/nextcloud-docker-dev$ docker compose exec nextcloud occ user:add jürgen
Warning: The account ID contains non-ASCII characters. This requires the "allow_unicode_usernames" system config flag and may break external storage, LDAP, federation, clients or apps that expect ASCII-only account IDs.
Enter password:
Confirm password:
The account "jürgen" was created successfully
Profiler output available at http://nextcloud.local/index.php/apps/profiler/profiler/db/SNNzx6eW5aQz7mRIeBUO/
ótzï@test-System-Product-Name:~/Schreibtisch/nextcloud/nextcloud-docker-dev$
I've already done a bit of testing and created a patch—it's doable. Here are a few screenshots

Currently, usernames can only consist of ASCII characters, but this poses a problem for email login. SMTPUTF8 allows email addresses with non-ASCII characters in the local part that cannot be converted using Punnycode or similar methods.
To protect existing systems, the default behavior for username validation could remain unchanged, and an opt-in option could allow usernames to be non-ASCII-compliant (as well as -bad-name in Linux user management).
My use case:
I want to switch from OneDrive to Nextcloud at my company, and as an IT service provider, I also want to help other companies migrate to Nextcloud, but because of this username restriction, that’s not an option for me right now (we already use email addresses with non-ASCII characters).
Update:
Patch: unicode-benutzernamen.patch
I've already done a bit of testing and created a patch—it's doable. Here are a few screenshots