1

Possible Duplicate:
User Names and White-Spaces

Are there any known problems to take into consideration while programming a website where login names my include spaces? If there is none, why most websites avoid it?

karel
  • 5,489
  • 46
  • 45
  • 50
banx
  • 4,376
  • 4
  • 30
  • 34

2 Answers2

1

Most known websites, or at least those with even an ounce of programming experience behind them, should not have problems with spaces in usernames, as they are escaped when inserted into the database. Some websites may avoid spaces in usernames just as a personal policy. Other than that I cannot think of any programming-based reasons.

parent5446
  • 898
  • 7
  • 17
1

Decent website software should not have any problem (read: it will not break) with whitespace in usernames. Forms, databases etc all support arbitrary text sufficiently.

However:

  • Using usernames with whitespace will prevent their reuse if a website decides to e.g. provide an E-mail redirection service later. Or in general to use them with a "legacy" service where whitespace is not supported.

  • Whitespace is vulnerable to various diseases. The split-at-end-of-line disease, the who-trimmed-my-spaces virus, the damn-how-many-spaces-are-there syndrome etc. It inserts unnecessary ambiguity while communicating something (usernames) which should never be ambiguous.

thkala
  • 84,049
  • 23
  • 157
  • 201