title: Using Non-Ascii characters in Tornado HTTP Header
body: <p>Using Tornado in Python 3.5, I have a problem setting Unicode character for HTTP Header. I need it to set the download file name in unicide (Content-Disposition header). But the following error would be occurred:</p>
  
  <pre><code>UnicodeEncodeError: 'latin-1' codec can't encode characters in position 42-46: ordinal not in range(256)
  </code></pre>
  
  <p>According to Tornado documentation, in python 2, a decode to latin1 and re-encode to utf8 will perform if non-ascii characters are used. But in python 3 the following line cause the exception:</p>
  
  <pre><code>lines.extend(l.encode('latin1') for l in header_lines)
  </code></pre>