Fix UnicodeEncodeError

This commit is contained in:
RedoX 2021-07-28 18:43:45 +06:00
parent 606c5e0ffd
commit c66ba730d3
2 changed files with 2 additions and 1 deletions

1
.gitignore vendored
View File

@ -7,3 +7,4 @@ dist/
.DS_Store
output/
venv/
.vscode/

View File

@ -32,7 +32,7 @@ def serialize_json(doujinshi, dir):
def serialize_comic_xml(doujinshi, dir):
from iso8601 import parse_date
with open(os.path.join(dir, 'ComicInfo.xml'), 'w') as f:
with open(os.path.join(dir, 'ComicInfo.xml'), 'w', encoding="utf-8") as f:
f.write('<?xml version="1.0" encoding="utf-8"?>\n')
f.write('<ComicInfo xmlns:xsd="http://www.w3.org/2001/XMLSchema" '
'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">\n')