title: ASCII codec can't encode character u'\u2013'
body: <p>I have a little Python code in Q_GIS which opens objects. The problem I have is that in the directory there is a character (underscore like character) that can not be encoded. The error is:</p>
  
  <blockquote>
    <p>Traceback (most recent call last):   File "", line 1, in 
    UnicodeEncodeError: 'ascii' codec can't encode character u'\u2013' in
    position 10: ordinal not in range(128)</p>
  </blockquote>
  
  <p>My little code is:</p>
  
  <pre><code>from os import startfile; 
  proj = QgsProject.instance(); 
  UriFile = str(proj.fileName()); 
  img = '[% "pad" %]'; 
  Path = str(os.path.dirname(UriFile)); 
  startfile(Path+img)
  </code></pre>
  
  <p>Because of my little programming skills, I ask you to help me add some code in this little code to overcome the problem.</p>