title: Python 2.7 file encoding fail
body: <p>When I am using Python 2.7 and trying to declare Python source code encoding by:</p>
  
  <pre><code>#!/usr/bin/python
  # -*- coding: utf-8 -*-
  </code></pre>
  
  <p>When I am checking file encoding by:</p>
  
  <pre><code>check_encoding = sys.getdefaultencoding()
  logger.warning("check_encoding ")
  </code></pre>
  
  <p>I am getting:</p>
  
  <pre><code>ascii
  </code></pre>
  
  <p>When I am using Python 3 I have no problem with that by declaring source code encoding by:</p>
  
  <pre><code>#!/usr/bin/python3
  # -*- coding: utf-8 -*-
  </code></pre>
  
  <p>When I am checking file encoding by:</p>
  
  <pre><code>check_encoding = sys.getdefaultencoding()
  logger.warning("check_encoding ")
  </code></pre>
  
  <p>I am getting:</p>
  
  <pre><code>utf-8
  </code></pre>
  
  <p>I have no idea what's wrong with Python 2.7 version and what can cause it.</p>