title: Python utf-8 character range
body: <p>I work with a text file, encoded with utf-8, and read its contents with python. After reading the content, I split the text to characters array. </p>
  
  <pre><code>import codecs
  
  with codecs.open(fullpath,'r',encoding='utf8') as f:
      text = f.read()
      # Split the 'text' to characters
  </code></pre>
  
  <p>Now, I'm iterating on each character. First, convert it to its hexadecimal representation and running some code on it.</p>
  
  <pre><code>numerialValue = ord(char)
  </code></pre>
  
  <p>I have noticed that between all those characters, some characters are beyond the expected range.</p>
  
  <blockquote>
    <p>Expected max value - FFFF. 
    Actual character value - 1D463.</p>
  </blockquote>
  
  <p>I translated this code to python. The original source code is coming from C#, whose value '\u1D463' is invalid character.</p>
  
  <p><a href="https://i.stack.imgur.com/WJelt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WJelt.png" alt="enter image description here"></a></p>
  
  <p>Being confused.</p>