We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d50ad1f commit 5202367Copy full SHA for 5202367
bioformats/omexml.py
@@ -17,8 +17,10 @@
17
import sys
18
if sys.version_info.major == 3:
19
from io import StringIO
20
+ uenc = 'unicode'
21
else:
22
from cStringIO import StringIO
23
+ uenc = 'utf-8'
24
25
import datetime
26
import logging
@@ -333,11 +335,11 @@ def __str__(self):
333
335
ElementTree.register_namespace("om", NS_ORIGINAL_METADATA)
334
336
result = StringIO()
337
ElementTree.ElementTree(self.root_node).write(result,
- encoding = "utf-8",
- method = "xml")
338
+ encoding=uenc,
339
+ method="xml")
340
return result.getvalue()
341
- def to_xml(self, indent="\t", newline="\n", encoding = "utf-8"):
342
+ def to_xml(self, indent="\t", newline="\n", encoding=uenc):
343
return str(self)
344
345
def get_ns(self, key):
0 commit comments