Commits

Brian Mearns committed c20467f

A little better able to handle UTF-8 content.

  • Participants
  • Parent commits 7eb2bfa

Comments (0)

Files changed (1)

File src/tome/writeLatex.py

         else:
             content = escape(content)
 
-        ostream.write(content)
+        if not isinstance(content, unicode):
+            content = unicode(content, "utf-8")
+        ostream.write(content.encode("utf-8"))
 
     else:
         raise TypeError("Unexpected type for segment.")