Skip to content

Commit

Permalink
Version 0.2.8
Browse files Browse the repository at this point in the history
rla2json: Ensure utf-8 encoding for the output file
  • Loading branch information
mos9527 committed Aug 24, 2024
1 parent 2d03249 commit 8c5d0b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sssekai/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__VERSION_MAJOR__ = 0
__VERSION_MINOR__ = 2
__VERSION_PATCH__ = 7
__VERSION_PATCH__ = 8

__version__ = '%s.%s.%s' % (__VERSION_MAJOR__,__VERSION_MINOR__,__VERSION_PATCH__)
4 changes: 2 additions & 2 deletions sssekai/entrypoint/rla2json.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

def worker_job(sname, version, script):
rla = read_rla(BytesIO(script), version)
dump(rla, open(sname + '.json', 'w'), indent=4, ensure_ascii=False)
dump(rla, open(sname + '.json', 'w', encoding='utf-8'), indent=4, ensure_ascii=False)

def main_rla2json(args):
with open(args.infile,'rb') as f:
Expand All @@ -27,7 +27,7 @@ def main_rla2json(args):
assert header, "RLH Header file not found!"
makedirs(args.outdir, exist_ok=True)
header = loads(header.text)
dump(header, open(path.join(args.outdir, 'sekai.rlh.json'), 'w'), indent=4, ensure_ascii=False)
dump(header, open(path.join(args.outdir, 'sekai.rlh.json'), 'w', encoding='utf-8'), indent=4, ensure_ascii=False)
version = tuple(map(int, header['version'].split('.')))
splitSeconds = header['splitSeconds']
logger.info('Version: %d.%d' % version)
Expand Down

0 comments on commit 8c5d0b7

Please sign in to comment.