Fix handling of UTF-8 in large SVG files

Fix #854
pull/856/head
Julien Duponchelle 8 years ago
parent 6778b29fc0
commit 51aef2b9c7
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

@ -126,7 +126,7 @@ class Drawing:
filename = hashlib.md5(value.encode()).hexdigest() + ".svg"
file_path = os.path.join(self._project.pictures_directory, filename)
if not os.path.exists(file_path):
with open(file_path, "w+") as f:
with open(file_path, "w+", encoding="utf-8") as f:
f.write(value)
self._svg = filename
else:

Loading…
Cancel
Save