Python django easy_pdf utf-8字符
我已经安装了easy\u pdf。我不知道它是否安装正确。一些UTF-8字符(łóżź)被渲染为不正确。我的模板是:Python django easy_pdf utf-8字符,python,django,Python,Django,我已经安装了easy\u pdf。我不知道它是否安装正确。一些UTF-8字符(łóżź)被渲染为不正确。我的模板是: {% extends "easy_pdf/base.html" %} {% block content %} <div id="content"> łóżąćęłń </div> {% endblock %} 从来没用过。一个想法(可能不是一个好主意)。。。看了一眼。如果您使用支持这些字符的字体怎么办?@ManolisC
{% extends "easy_pdf/base.html" %}
{% block content %}
<div id="content">
łóżąćęłń
</div>
{% endblock %}
从来没用过。一个想法(可能不是一个好主意)。。。看了一眼。如果您使用支持这些字符的字体怎么办?@ManolisC。是的,我加了utf-8,thanks@strz你有没有这样做过?如果有,怎么做?
class HelloPDFView(PDFTemplateView):
template_name = "rhymes.html"
def get_context_data(self, **kwargs):
return super(HelloPDFView, self).get_context_data(pagesize="A4", title="PDF", **kwargs)