Django - Postgres - 'ascii' codec can't encode character u'\xa0' in position 0: ordinal not in range(128)
<p>So I get the error above when I try to use the Admin console and view one of the models in my database. The rows in my database were scraped from a website so if I'm correct, I accidentally scraped the u'\xa0' character and Django does not like this. Correct me if I'm wrong.</p>

<p>Now to fix it I imagine I can just run a psql query to find any u'\xa0' characters and replace them with whatever I need (empty string in this case).</p>

<p>I thought maybe I could use the replace function from postgres:</p>

<pre><code>UPDATE &lt;table&gt; SET &lt;field&gt; = replace(&lt;field&gt;, '\xa0', '')
</code></pre>

<p>but it doesn't appear to be working.</p>

<p>Any tips?</p>

<p>Error:</p>

<pre><code>'ascii' codec can't encode character u'\xa0' in position 0: ordinal not in range(128)
</code></pre>