title: Printing non-ascii characters in python/jinja
body: <p>The following code works correctly:</p>
  
  <pre><code>from jinja2 import Template
  
  mylist = ['some text \xc3']
  
  template = Template('{{ list }}')
  
  print template.render(list=mylist)
  </code></pre>
  
  <p>When I run it, it outputs:</p>
  
  <pre><code>['some text \xc3']
  </code></pre>
  
  <p>Yet, when I try to print the actual list element, it fails:</p>
  
  <pre><code>template = Template('{{ list[0] }}')
  
  print template.render(list=mylist)
  </code></pre>
  
  <p>The error is:</p>
  
  <pre><code>UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 10: ordinal not in range(128)
  </code></pre>
  
  <hr>
  
  <p>I would like to find a way to print the individual list element in the same way that the whole list is printed, where the non-ascii character is represented with the \x notation.</p>