I'm processing the following xml file:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<tag>…</tag>
Just like python documentation says:
import xml.etree.cElementTree as ET
tree = ET.parse('file.xml')
print(tree.getroot().text)
But unfortunately I've got such an error:
Traceback (most recent call last):
File "main.py", line 48, in <module>
print(tree.getroot().text)
File "C:\Python33\lib\encodings\cp852.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_map)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u2026' in position 0: character maps to <undefined>
What am I doing so wrong?