title: UnicodeEncodeError when trying to convert Django models to XML
body: <p>I found a python program: <a href="http://siddhi.blogspot.com/2006/09/export-django-database-to-xml-file.html" rel="nofollow">Export Django database to xml file</a> that converts django models to a xml representation. I get these errors when trying to run the program. My models contain some text written in French.</p>
  
  <pre><code>Traceback (most recent call last):
    File "xml_export.py", line 71, in &lt;module&gt;
    writer.content(value)
  File "xml_export.py", line 41, in content
    self.output += str(text)
  UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 3:
  ordinal not in range(128) 
  </code></pre>