Commit 1154321b authored by Patrik Dufresne's avatar Patrik Dufresne

Define the tar.gz encoding.

When LANG is not define, python will fallback to ascii encoding for the
creation of tar.gz archive. This is not the expected behaviour. We want
to always use UTF8 when creating archive.
parent e582a5c4
......@@ -57,10 +57,10 @@ class TarArchiver(object):
# Open the tar archive with the right method.
if isinstance(dest, str):
self.z = tarfile.open(name=dest, mode=mode)
self.z = tarfile.open(name=dest, mode=mode, encoding='UTF8')
self.fileobj = None
else:
self.z = tarfile.open(fileobj=dest, mode=mode)
self.z = tarfile.open(fileobj=dest, mode=mode, encoding='UTF8')
self.fileobj = dest
def addfile(self, filename, arcname):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment