Quote:It has nothing to with changing a normal string as Python do that fine alone.
It's only for working with and manipulatingMicrosoft Word
(.docx) files.
i didn't get something, then.
because when i try to use just python with a command like file.write(line.replace('this', 'that')) i have an error message
Error:traceback (most recent call last):
File "test.py", line 6, in <module>
for line in input:
File "/usr/lib/python3.6/codecs.py", line 321, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe8 in position 253: invalid continuation byte
i gather this is because linux doesn't like windows codecs. i could have changed this where i dealing with "just" a text file, saving it with the UTF-8 thingy. this won't do with a docx file.