title: Unicode issue using flask and mssql guids with FreeTDS
body: <p>I have a flask app that recently had to start using mssql generated guid's as primary keys (previously it was just integers). The guid's are latin-1 encoding. Also, I am not using sqlalchemy. Now, when I'm trying to display the queried mssql guid's in a flask jinja2 template, I get the following error:</p>
  
  <blockquote>
    <p>UnicodeDecodeError: 'ascii' codec can't decode byte 0xc1 in position 0: ordinal not in range(128).</p>
  </blockquote>
  
  <p>I've tried:</p>
  
  <ul>
  <li>unsetting the LANG on the linux host</li>
  <li>Forcing utf-8 in FreeTDS config (this was already done)</li>
  <li>escaping in the jinja template</li>
  <li>using python3, no luck</li>
  <li>switching from pypyodbc to pyodbc3, but the problem presists</li>
  </ul>
  
  <p>Nothing seems to work. If I import sys and set the decoding to utf-8, the error changes replacing ascii with utf-8, but the jinja template will not render the guid's.</p>
  
  <p>Any thoughts? Thanks for reading. Also to note, my dev environment is on windows 7 and this issue does not crop up there. It's only on the linux server.</p>