15

When I opened my account here, I used "Niranjan" as my display name. Now I want to change it and have Devanagari characters in it, but the site doesn't allow me to do so. It says the following:

Oops! There was a problem updating your profile: Display Name can only contain letters, digits, spaces, apostrophes or hyphens and must start with a letter or digit

I initially thought that non-ASCII characters aren't allowed at all, but that is not true. I saw some profiles which had non-ASCII characters in their display name. One had Arabic characters. Just for testing for a very short span of time, I changed my name with the exact same Arabic characters and the name got changed. So I suppose there is some problem with the current design regarding Devanagari script.

I want "निरंजन" as my display name. How can I do that? The involved characters and there details are as follows:

Character Unicode character Unicode codepoint
devanagari letter na U+0928
ि devanagari vowel sign i U+093F
devanagari letter ra U+0930
devanagari sign anusvara U+0902
devanagari letter ja U+091C

It seems that the second character, 'ि' is the culprit, because without it I could rename my profile: https://webapps.stackexchange.com/users/279265/नरंजन

20
  • 1
    It looks like it may be possible? I found one user who seems to have a name in this script. (There are very few people I've seen with non-Latin character names, even on sites where I'd expect to see otherwise.)
    – Laurel
    Commented Nov 28, 2021 at 19:52
  • 2
    Ah! Got it. There is some problem when the initial character is followed by a vowel diacritic. The profile that you shared has no such diacritic mark. If I remove the diacritic mark from my name, I could change the name. Maybe this one is related: meta.stackexchange.com/q/49266/498784 Thanks a lot by the way :)
    – Niranjan
    Commented Nov 28, 2021 at 20:29
  • 2
    First, it's not a bug; SE have white list of characters/character sets for a reason. I don't want to see people use ☺☺☺ as display name. Second, since SE is English-only, I don't think display names written in foreign languages are good idea. Many people won't have a clue what they mean, and if they might be offensive. Commented Nov 29, 2021 at 14:27
  • 6
    I can be offensive in my language using Latin script. "Many people" would still not have any clue about it.
    – Niranjan
    Commented Nov 29, 2021 at 15:22
  • 8
    Also if this is "the policy" then it should at least be universal. Why to allow some characters of a particular script and disallow some of the same script? The well-researched answer received for this question clearly demonstrates that the problem is technical. If there was no way to get non-ASCII characters, I would have still not called this a bug, but it really seems like the policy is half-cooked and the design is not well-formed.
    – Niranjan
    Commented Nov 29, 2021 at 15:25
  • 9
    @ShadowWizardIsVaccinatedV3 The characters are all in the Devanagari unicode block, allowing those and other similar blocks wouldn't allow '☺☺☺ ' (if that was even a problem!). Besides, if we allow zalgo text in usernames, why not characters used in actual names? Commented Nov 29, 2021 at 15:43
  • 1
    @Pureferret I wasn't aware Zalgo is allowed, and looks like the disallowed characters are punctuation marks which still makes sense to be blocked. As far as I remember from ancient past when I was trying something, same goes with Hebrew. Letters allowed, punctuation marks (which are unicode characters of their own) are blocked, and I am fine with it. Commented Nov 29, 2021 at 15:45
  • 9
    @ShadowWizardIsVaccinatedV3 would the reason you are fine with it be partly because you aren't affected? Also, they aren't 'punctuation' like ; DROP tables has. Abugidas rely on these characters to create new letters. It'd be like allowing O in english, but not Q, if that was made with Q+tail. Commented Nov 29, 2021 at 15:55
  • 2
    @Pureferret like I said, SE is English oriented, I'm not affected because I don't want display name that only few will understand. Of course in case of the localized SE sites it is different, but the question here is general. for all sites. Commented Nov 30, 2021 at 6:35
  • 2
    @ShadowWizardIsVaccinatedV3 You say you didn't know Zalgo was allowed in usernames, but on the linked thread, you were one of the users testing Zalgo in usernames? Commented Nov 30, 2021 at 15:20
  • 2
    @ShadowWizardIsVaccinatedV3 'English Orientated' does not mean 'English Exclusive' if it were then only latin characters would be allowed, right? But it looks like there's certain unicode characters that trip up the site's parsing, which normally works. Commented Dec 1, 2021 at 13:28
  • 3
    @ShadowWizardIsVaccinatedV3 We even allow names like ᅙᄉᅙ and ᔕᖺᘎᕊ and your argument against fixing individual characters from a unicode block that otherwise works is that the site is 'english orientated'? Commented Dec 1, 2021 at 13:28
  • 1
    @TheAmplitwist thanks, it should point to meta.stackexchange.com/users/260841/… Commented Dec 1, 2021 at 13:55
  • 1
    @Shadow Wizard Is Vaccinated V3: Example of using some of the allowed characters: πάντα ῥεῖ (presumably Makulik Günther) Commented Dec 3, 2021 at 14:21
  • 1
    @P.Mort.-forgotClayShirky_q I know, and I'm not a fan of those names. I have nothing against those using them, my point is only that I won't object if such names won't be allowed, as they're unreadable for most people. Commented Dec 4, 2021 at 8:39

1 Answer 1

8

Apparently the workaround is to start dropping diacritics from your name until something goes through. In this case it was a vowel diacritic (ि) that was not compatible.

More precisely, you can use a site like Regex101.com to find incompatible characters like this. Set the "u" Unicode flag (next to the slash on the right) and see which characters don't match \w. For example:

Screenshot of regex101 with the latin character token regular expression matching the desired username

You can see the regex pattern in action.

You can also see the exact breakdown of characters on a Unicode lookup site. What looks like the first character shown above is actually two Unicode characters.

Character Unicode character Unicode codepoint
devanagari letter na U+0928
ि devanagari vowel sign i U+093F
devanagari letter ra U+0930
devanagari sign anusvara U+0902
devanagari letter ja U+091C

(The regex that decides what names are allowed isn't as simple as this, since I know more characters are allowed, such as spaces and hyphens.)

16
  • 5
    The diacritic has a meaning. I can't drop it because the program doesn't understand it. It would be best if this can be solved internally.
    – Niranjan
    Commented Nov 29, 2021 at 5:32
  • 5
    The question then becomes why \w does not match combining diacritics. This does not make the slightest bit of sense to me: a diacritic is a word character just like a base letter. Commented Nov 29, 2021 at 8:20
  • @emil python, not .NET but maybe a similar reason to here? stackoverflow.com/q/3141032/1075247 Commented Nov 29, 2021 at 10:27
  • @Pureferret The page you linked to offers no reason at all. It just notes as a fact that \w also behaves this way in Python, with no explanation why. Commented Nov 29, 2021 at 10:32
  • 2
    @EmilJeřábek the linked question doesn't provide a reason but it does provide a possible solution - if .NET has something similar to normalize in Python then this could be used to verify the display name (and subsequently use the original non-normalized string as actual display name, not sure if this would allow problematic display names to pass the filter but I don't think it would).
    – Marijn
    Commented Nov 29, 2021 at 10:42
  • 1
    @Marijn As far as I can tell, this solution will not actually work in general. Normalization to NFC will not remove all diacritics, only those that can be combined with the base letter to a precomposed character. Not every letter+diacritics sequence has a precomposed character in Unicode (the number of possible combinations is vastly larger than the number of code points). Much better workarounds are suggested in the accepted answer (use some combination of \p{L} and \p{M} instead of \w). Commented Nov 29, 2021 at 10:59
  • @EmilJeřábek you are correct, the normalize function does not change the composition characters that don't have an equivalent - the display name in the current question for example remains unaltered. That Python library does however provide category values for characters so it is possible to strip out everything \w doesn't accept. However I'm not sure how useful this is as a workaround and if something similar exists for .NET.
    – Marijn
    Commented Nov 29, 2021 at 11:58
  • @Laurel I tried to add (UA8FB) and (U0971) at the initial position of my name. Both of these characters pass the test on regex101.com, but still the name didn't change. So possibly there is something more than this too which is problematic. Can you please guide?
    – Niranjan
    Commented Nov 30, 2021 at 8:51
  • @Niranjan you may need to wait for a developer to come by to explain more Commented Nov 30, 2021 at 13:22
  • 1
    @Pureferret Okay, is there any repository where I can file the bug report?
    – Niranjan
    Commented Nov 30, 2021 at 13:42
  • 1
    @Niranjan my understanding, is that by tagging your question as bug it will have automatically been added to the developers backlog, but they are often too busy to respond immediately Commented Nov 30, 2021 at 13:47
  • @Pureferret Okay. Thanks for your help so far. I'll wait :)
    – Niranjan
    Commented Nov 30, 2021 at 13:58
  • 1
    @Pureferret not really. It's added to the backlog only when getting a status-review tag. Otherwise their backlog will overflow with thousands of bugs and they won't be able to handle it. In the past, the developer on bug duty just picked bugs in random, it was changed not long ago. Commented Nov 30, 2021 at 15:27
  • @Niranjan I'm not sure. The first character doesn't even display for me (it's the missing font box). Do the characters work elsewhere in your name? And can you add the list of characters from your alphabet to your question? (Note that you're also limited in how often you can change your name on each site.)
    – Laurel
    Commented Nov 30, 2021 at 16:23
  • @Laurel I just added those characters to escape the check. It seems that it isn't accepting नि in any case. Removing नि works absolutely fine. I have renamed my profile that way on one of the forum. Which means ि (U093F) is the culprit. Shall this be added to the answer for the convenience of investigators? PS: I am adding the character information in the question.
    – Niranjan
    Commented Dec 1, 2021 at 12:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .