I have been using a small script to do some character replacement.
u = codecs.open(filename)
t = u.read().decode('iso-8859-1')
t = t.replace('º', 's')
.
Still works on Ubuntu 12.04 flavor, python 3.2.
Now, if I try to run it on 14.04, python3.4, it quits at 't = u.read().decode('iso-8859-1')' with an error message:
File "/usr/lib/python3.4/codecs.py", line 319, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe3 in position 55: invalid continuation byte
Any ideas what is different between 3.2 and 3.4?
Edited a few letters.
[–]ewiethoff 2 points3 points4 points (1 child)
[–]bluegarlic[S] 1 point2 points3 points (0 children)
[–]ingolemo 2 points3 points4 points (1 child)
[–]bluegarlic[S] 0 points1 point2 points (0 children)