1. Brian Mearns
  2. tome

Commits

Brian Mearns  committed c20467f

A little better able to handle UTF-8 content.

  • Participants
  • Parent commits 7eb2bfa
  • Branches default

Comments (0)

Files changed (1)

File src/tome/writeLatex.py

View file
         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.")