From c0a1d29bdfbd65a9362bcbab126269bc96073fd1 2013-08-01 20:29:05 From: Thomas Robitaille Date: 2013-08-01 20:29:05 Subject: [PATCH] Fix for converting notebooks that contain unicode characters. --- 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