£ Sign on python SQLAlchemy query <p>I am trying to inject into a query, a string in the following way:</p> <pre><code>value = '£' query = """select * from table where condition = '{0}';""".format(value) </code></pre> <p>the problem is the result of this formatting is:</p> <blockquote> <p>select * from table where condition = '\xc2\xa3';</p> </blockquote> <p>Since I will use this query with sqlalchemy, I need the encoded characers to appear as the actual pund sign.</p> <p>Any ideas on how I can makes this query look like this?:</p> <blockquote> <p>select * from table where condition = '£';</p> </blockquote> <p>I am using postgres 3.5 and python 2.7.6</p> <p>Also if I try the following:</p> <pre><code>'\xc2\xa3'.decode('utf-8') </code></pre> <p>the result is:</p> <blockquote> <p>u'\xa3'</p> </blockquote>