Hello there! My site has users who would like to use emoji in their usernames and I’m trying to find out if that’s possible for them. I was able to find the setting that lets you broaden the unicode options for usernames:
Lifting the restrictions on allowed characters in usernames is one of the oldest feature requests. Starting with Discourse 2.3.0.beta9 it’s finally possible to use Unicode characters within usernames and group names.
[image]
New Site Settings
There are two new site settings: allowed unicode username characters and unicode usernames.
allowed unicode username characters allows you to allow only certain Unicode characters (e.g. [äöüßÄÖÜẞ] or \p{Greek}). By default Discourse permits letters (Ll …
but as far as I can tell, it doesn’t seem to work with emoji. Here’s two cases, one where things work as I’d expect and one where they don’t:
Case 1 - Working as Expected
Unicode usernames are allowed, certain non-ASCII unicode characters are permitted:
Results in a username using those characters being accepted:
Case 2 - Not Working as Expected
Unicode usernames are allowed, specific emoji characters are permitted:
But a username using the permitted character is not accepted:
I get the same result if I leave allowed unicode username characters
blank, i.e. permitting everything with no regex whitelist for characters.
My Question:
Is it possible to allow emoji in usernames?
gerhard
(Gerhard Schlager)
May 31, 2024, 7:31am
2
No, it’s not possible to allow Emojis within usernames. They aren’t considered a letter.
By default Discourse permits letters (Ll / Lm / Lo / Lt / Lu ), marks (Mc , Me , Mn ) and numbers (Nd , Nl , but not No ). The setting can restrict those characters, but it’s not possible to allow additional characters.
2 Likes
Alas. Well, thank you for the answer!
system
(system)
Closed
July 1, 2024, 10:37pm
4
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.