title: What encoding scheme is used by Python 2.7 interpreter to encode Unicode code points before sending to terminal?
body: <p>I am using python 2.7. My terminal's encoding scheme is set as 'utf-8'. Python's default encoding scheme is 'ascii'.</p>
  
  <pre>
  >>> sys.getdefaultencoding()
  'ascii'
  </pre>
  
  <p>When I write </p>
  
  <pre>
  >>> print(u'à')
  à
  </pre>
  
  <p>The correct Unicode character is displayed on my terminal. I am not getting what encoding scheme does python interpreter use to encode the Unicode code-point before sending it to the terminal. Is it UTF-8? But the default encoding scheme for python is set as 'ascii'. How does it decide to encode using UTF-8.</p>
  
  <p>EDIT:<br>
  I know that I can specify the encoding myself as below:</p>
  
  <pre>
  >>> print(u'à'.encode('utf-8'))
  à
  </pre>
  
  <p>But was wondering how does it work when I don't specify the encoding.</p>