Length of nickname
Closed, ResolvedPublic

Description

I've tried to use (for test) nickname of 150 cyrillic characters and recieved error message "Nickname too long; must be under 250 characters."

Apparently, this message is about size of Unicode string, not about characters.


Version: 1.11.x
Severity: enhancement

bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz10338.
ajvol created this task.Via LegacyJun 23 2007, 2:38 PM
bzimport added a comment.Via ConduitJun 23 2007, 7:22 PM

robchur wrote:

We should probably check that a multi-byte compatible string length function is being used.

bzimport added a comment.Via ConduitJun 24 2007, 2:14 AM

ayg wrote:

How about you not use an insanely long username? :) You should be able to get up to about 85 characters even in Cyrillic or Chinese or other three-byte UTF-8 scripts, and that should already be more than would be conceivably typeable without causing frequent sentiments of extreme aggression in your fellow wiki users. In any case it's the maximum possible length for the database field in MySQL 4 (or close enough), so we'd have to switch to MEDIUMTEXT or something if we wanted to allow this, which seems fairly ridiculous.

ajvol added a comment.Via ConduitJun 24 2007, 8:40 AM

should we change message
'badsiglength' => 'Nickname too long; must be under $1 characters.'
to
'badsiglength' => 'Nickname too long; must be under $1 bytes of UTF-8.',
?

brion added a comment.Via ConduitJun 25 2007, 2:55 PM

*rolleyes* fine people :)

We can make it characters. That'll make the input box limitation work properly as well.

brion added a comment.Via ConduitJun 25 2007, 3:54 PM

Went ahead and changed it in r23389. We've got a fallback implementation for mb_strlen() so it's available now with or without mbstring.

Since it's not being limited by a 255-byte database field, switching this one to use characters is easy.

bzimport added a comment.Via ConduitJun 25 2007, 5:05 PM

ayg wrote:

Whoops, I'm an idiot. I somehow thought that this was talking about actual usernames. The terminology in that message confuses the hell out of me without context, although with context I guess it's clear enough. Sorry. :)

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.