Skip to content

Commit

Permalink
Specify utf-8 encoding in io.open()
Browse files Browse the repository at this point in the history
  • Loading branch information
slel authored Jan 16, 2019
1 parent 780ef87 commit 0579bc0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion notebook/notebookapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -1671,7 +1671,7 @@ def server_info(self):
def write_server_info_file(self):
"""Write the result of server_info() to the JSON file info_file."""
try:
with io.open(self.info_file, 'w') as f:
with io.open(self.info_file, 'w', encoding='utf-8') as f:
json.dump(self.server_info(), f, indent=2, sort_keys=True)
except OSError as e:
self.log.error(_("Failed to write server-info to %s: %s"),
Expand Down

0 comments on commit 0579bc0

Please sign in to comment.