aboutsummaryrefslogtreecommitdiffstats
path: root/wkhtmltopdf/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'wkhtmltopdf/utils.py')
-rw-r--r--wkhtmltopdf/utils.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/wkhtmltopdf/utils.py b/wkhtmltopdf/utils.py
index 99998a2..8e0caef 100644
--- a/wkhtmltopdf/utils.py
+++ b/wkhtmltopdf/utils.py
@@ -71,6 +71,9 @@ def wkhtmltopdf(pages, output=None, **kwargs):
options = copy(options)
options.update(kwargs)
+ # Force --encoding utf8 unless the user has explicitly overridden this.
+ options.setdefault('encoding', 'utf8')
+
env = getattr(settings, 'WKHTMLTOPDF_ENV', None)
if env is not None:
env = dict(os.environ, **env)