title: String length validation based on bytes and not length
body: <p>I have been asked by a Japanese person to change the string length validation of a form.</p>
  
  <p>Currently, does normal string length validation (what counts is the number of characters regardless of what those characters are).</p>
  
  <p>What I've been asked to do is to validate string length based on bytes - in other words, <code>four 1-byte characters</code> and one <code>2-byte characters</code> would account for a length of <code>6-byte</code> total length even though there's <code>5</code> characters.</p>
  
  <p>And what I need to know is:</p>
  
  <p>1) Are there only 1 and 2 byte characters? (<a href="https://japanese.stackexchange.com/questions/6872/are-the-4-byte-utf-8-kanji-rare-enough-that-i-can-ignore-them">This question talks about 3 and 4 byte characters)</a></p>
  
  <p>2) What are the range of all characters that I should count as 1 byte or 2 bytes?
  I am sure the person who asked me for this can give a few examples but I really must have all cases covered.</p>