Allow usernames with non-English characters

Bug #1828923 reported by GunChleoc
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Widelands Website
Won't Fix
Undecided
Unassigned
widelands
Won't Fix
Wishlist
Unassigned

Bug Description

We currently only allow a subset of ASCII in usernames. It would be nice if speakers of languages other than English were more free in their choice, e.g. allow them to add äßé or a Username in Cyrillic or Chinese script.

See also the website bug 1784693 "Using Unicode literals cause a server error"

Related branches

Revision history for this message
kaputtnik (franku) wrote :

This is a restriction of Django in combination python2:

"... Unicode characters have always been accepted when using Python 3. Django 1.10 officially added Unicode support in usernames, keeping the ASCII-only behavior on Python 2."

See: https://docs.djangoproject.com/en/1.11/ref/contrib/auth/#django.contrib.auth.models.User.username

So the switch to python 3 will accept a wide range of additional characters. Tested 'ß' in usernames, also polish characters in the python3 branch.

But we need to change the database encoding to fully support unicode (e.g. chinese characters), which means the length of text columns shrinks and thus there is a possibility to loose some of text in old entries. So this has to be done carefully.

Revision history for this message
Toni Förster (stonerl) wrote :

Before we can enable this on the website, we need to make sure widelands can properly handle this.

Here is a list of things to do first:

- proper username parsing (e.g. spaces in names)
- autocomplete usernames on tab in chats
- proper chinese/japanese/korean etc input
  (at least japanese is broken)

We must be sure that usernames are accessible by others; for wispering, warning & kicking. Otherwise, a user could just choose a name that other can't type and non of the above mentioned would be possible.

That's why I'm currently limiting the possible characters for usernames in widelands.

Enabling this will be much work. We should also make sure that we do not enable support for this on the website without having the code in widelands in place.

Revision history for this message
kaputtnik (franku) wrote :

> - proper username parsing (e.g. spaces in names)

FYI: django's default is to permit spaces in usernames.

Revision history for this message
kaputtnik (franku) wrote :

Sorry: djangos default is to __forbid__ spaces in usernames

Revision history for this message
Toni Förster (stonerl) wrote :

Well, then we can add one checkmark to the list :)

Revision history for this message
GunChleoc (gunchleoc) wrote :

I am in favor of reworking the chat UI so that player can click on a user in a list of usernames to add their name to the chat. That would also solve the problem of accidentally posting publicly instead of whispering when you mistype a username.

It would also be really cool if we had a team chat in-game.

So, start this project with a redesign of the chat UI?

kaputtnik (franku)
description: updated
Revision history for this message
Toni Förster (stonerl) wrote :

> So, start this project with a redesign of the chat UI?

I guess... :)

Revision history for this message
GunChleoc (gunchleoc) wrote :
Changed in widelands-website:
status: New → Won't Fix
Revision history for this message
GunChleoc (gunchleoc) wrote :
Changed in widelands:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.