diff --git a/IPython/nbconvert/writers/files.py b/IPython/nbconvert/writers/files.py index 282c9fb..64f0172 100644 --- a/IPython/nbconvert/writers/files.py +++ b/IPython/nbconvert/writers/files.py @@ -103,6 +103,6 @@ class FilesWriter(WriterBase): # Write conversion results. self.log.info("Writing %i bytes to %s", len(output), dest) - with io.open(dest, 'w') as f: - f.write(output) + with io.open(dest, 'wb') as f: + f.write(output.encode('utf-8')) return dest \ No newline at end of file