How to create PDF file with UTF-8 in Google App Engine Python 2.7
<p>I am creating PDF file in Google App Engine using Python 2.7. I am using template html file to generate PDF content. I think I marked that I am using UTF-8 coding in every step however created PDF cannot display it properly. So far I tested in on localhost only. Could you advice me what I am doing wrong?</p>

<ol>
<li><p>Template document. I set in file properties UTF-8 coding and put utf-8 charset in metadata. </p>

<pre><code>&lt;html&gt;
&lt;head&gt;
    &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;
&lt;/head&gt;
&lt;body&gt;
    Działając
&lt;/body&gt;
&lt;html&gt;
</code></pre></li>
<li><p>Code creating PDF file has marked UTF-8 coding in every possible place. Cource code file is also UTF-8.</p>

<pre><code># -*- coding: utf-8 -*-

... code skipped

#    f = codecs.open(os.path.join(APP_TEMPLATES, 'test.html'), encoding ='utf-8')
#    fdata = f.read()
#    f.close()    
#   htmpPage = render_template_string(fdata, encoding='utf-8')

htmpPage = render_template('test.html', encoding='utf-8')

pdfOUTPUT = StringIO.StringIO()

pisa.pisaDocument(htmpPage,dest=pdfOUTPUT, encoding='utf-8')
#    pisa.CreatePDF(htmpPage, dest=pdfOUTPUT, encoding='UTF-8')

response = make_response(pdfOUTPUT.getvalue())
response.headers.set('Content-Disposition', 'attachment', filename='test' + '.pdf')
response.headers.set('Content-Type', 'application/pdf;charset=UTF-8')
</code></pre></li>
<li><p>Created PDF does not display string correctly
<a href="https://i.stack.imgur.com/X2Wzw.png" rel="nofollow"><img src="https://i.stack.imgur.com/X2Wzw.png" alt="enter image description here"></a></p></li>
</ol>