title: why making a user registration must be regular?
body: <p>I'm programming a user registration. However, I found a charactor limiting to 'username' from sample codes, such as just '.', ''', '-' are accepted, no space or other blank, etc.</p>
  
  <p>Are those restrictions necessary?</p>
  
  <p>I'm using MySQL+PHP. If I adopt the following several ways:</p>
  
  <blockquote>
    <ol>
    <li>change the collation of the column to 'utf8_general_ci';</li>
    <li>pull in the function 'mysql_escape_string' or 'mysql_real_escape_string' to PHP;</li>
    <li>create a relation table about username &lt;-> userID (the 'username' is what the client input, userID is a INT number.). As well as just use 'userID' in the database, but 'username' only display in HTMLs.</li>
    </ol>
  </blockquote>
  
  <p>Do I really need a regular expression?</p>
  
  <p>Thank you for your help.</p>
  
  <hr>
  
  <p>PS: I'm a Chinese, so Chinese characters are required.</p>