title: Django: Non-ASCII character
body: <p>My Django View/Template is not able to handle special characters. The simple view below fails because of the ñ. I get below error:</p>
  
  <blockquote>
    <p>Non-ASCII character '\xf1' in file"</p>
  </blockquote>
  
  <pre><code>def test(request):
      return HttpResponse('español')
  </code></pre>
  
  <p>Is there some general setting that I need to set? It would be weird if I had to handle all strings separately: non-American letters are pretty common!</p>
  
  <p><strong>EDIT</strong>
  This is in response to the comments below. It still fails :(</p>
  
  <p>I added the coding comment to my view and the meta info to my html, as suggested by Gabi. </p>
  
  <p>Now my example above doesn't give an error, but the ñ is displayed incorrectly. </p>
  
  <p>I tried <code>return render_to_response('tube/mysite.html', {"s": 'español'})</code>. No error, but it doesn't dislay (it does if s = hello). The other information on the html page displays fine.</p>
  
  <p>I tried hardcoding 'español' into my HTML and that fails: </p>
  
  <blockquote>
    <p>UnicodeDecodeError 'utf8' codec can't decode byte 0xf. </p>
  </blockquote>
  
  <p>I tried with the u in front of the string:</p>
  
  <blockquote>
    <p>SyntaxError (unicode error) 'utf8' codec can't decode byte 0xf1</p>
  </blockquote>
  
  <p>Does this help at all??</p>