The online racing simulator
LFS username encoding
(13 posts, started )
#1 - expr
LFS username encoding
While these days new LFS usernames (not in-game names) are restricted to a subset of the traditional 7-bit ASCII, a look at the existing names quickly reveals this hasn't always been the case.

Are all existing usernames at least canonically in the same encoding (which my guess would be Windows-1252)? What other now-disallowed characters you remember seeing besides the usual “!{}[]@äö=”? edit: Or can someone perhaps even remember what the old username restrictions were, if they were documented? And especially, are there any usernames with carets in them?
I dont know what is you problem here.. it is just a name, you can always ctrl+shift and u see username use that and stop post shit here, thanks !
Quote from Legendlfs :I dont know what is you problem here.. it is just a name, you can always ctrl+shift and u see username use that and stop post shit here, thanks !

OP is looking for username restrictions. Also, just know that you're reading on LFS Programmer Forum.
I can't help you with that either, expr. Just wanted to point out to Legendlfs.
i know that, there is no restriction to usrename just use ctrl+shit !
-
(lucaf) DELETED by lucaf : offtopic
so?? OP is program then ?
I banned Legendlfs for a month, 95% of this posts are just trolling.
Here is a function to check user names for validity in LFS. It is based on the restrictions applied by the website but modified to allow some characters that were previously allowed. Note that there must be be a terminating zero in the user_name passed to this function and it can only have up to 23 characters plus the terminating zero.


int user_name_invalid(const char *user_name)
{
const unsigned char *b = (const unsigned char *) user_name;

int len = 0;

while (*b)
{
if (*b < 32 || // special characters below space
(*b >= 34 && *b <= 39) || // " # $ % & '
(*b >= 127 && *b <= 191) || // DEL and 4 rows to inverted question mark
*b == 42 || *b == 44 || *b == 47 || // * , /
*b == 58 || *b == 59 || // : ;
*b == 60 || *b == 62 || *b == 63 || // < > ?
*b == 92 || *b == 94 || *b == 96 || // backslash ^ `
*b == 124) // |
{
return 2; // invalid character
}

len++;
b++;
}

if (len < 3) return 1; // too short

if (user_name[0]==32 || user_name[len - 1]==32) return 3; // spaces at start or end

return 0;
}

#8 - Racon
Quote from Scawen :
*b < 32


If we ever meet, in amongst large amounts of fawning hero-worship for LFS and Insim, there will be a short, sharp poke-in-the-eye because that 32 is not a 33. Thumbs up
#9 - expr
Quote from Scawen :Here is a function to check user names for validity in LFS. It is based on the restrictions applied by the website but modified to allow some characters that were previously allowed. Note that there must be be a terminating zero in the user_name passed to this function and it can only have up to 23 characters plus the terminating zero.

Thanks!
Quote from Racon :If we ever meet, in amongst large amounts of fawning hero-worship for LFS and Insim, there will be a short, sharp poke-in-the-eye because that 32 is not a 33. Thumbs up

I am confused. The space is allowed as username but the description behind the code suggest otherwise.
#11 - expr
Quote from cargame.nl :I am confused. The space is allowed as username but the description behind the code suggest otherwise.

Space is allowed, but not as a leading or trailing character.
Quote from cargame.nl :I am confused. The space is allowed as username but the description behind the code suggest otherwise.

Looks pretty clear. The space is allowed, except at the end and start like expr said.
Which is covered at the second to last line yes. I think some are missing the point here. Or the space in this case.

LFS username encoding
(13 posts, started )
FGED GREDG RDFGDR GSFDG