Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions chat_downloader/output/continuous_write.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def write(self, item, flush=False):
self.file.seek(0, os.SEEK_END) # Go to the end of file

to_write = json.dumps(
item, indent=self.indent, sort_keys=self.sort_keys)
item, ensure_ascii=False, indent=self.indent, sort_keys=self.sort_keys)
if self.indent is not None:
indent_padding = '\n' # to add on a new line
to_write = indent_padding + self._multiline_indent(to_write)
Expand Down Expand Up @@ -166,7 +166,7 @@ def __init__(self, file_name, sort_keys=True, **kwargs):
self.file = open(self.file_name, 'a', encoding='utf-8')

def write(self, item, flush=False):
print(json.dumps(item, sort_keys=self.sort_keys),
print(json.dumps(item, ensure_ascii=False, sort_keys=self.sort_keys),
file=self.file, flush=flush)


Expand Down