Comment 7 for bug 989496

Revision history for this message
Savvas Radevic (medigeek) wrote : Re: UnicodeDecodeError: 'utf8' codec can't decode byte 0xd1 in position 117

The problem is with the filename encoding you have. Please check if any files or folders have weird characters that look like these: �����

This is an example in python:
>>> unicode('\x95','utf-8')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
UnicodeDecodeError: 'utf8' codec can't decode byte 0x95 in position 0: invalid start byte

This seems to work (but haven't tested it with duplicity):
>>> unicode('\x95','utf-8', "replace")
u'\ufffd'

>>> unicode('\xd1','utf-8', 'replace')
u'\ufffd'

The developers could use either "replace" or "ignore", but I don't know which one suits the purpose best. Or even use "try ... except UnicodeDecodeError" and skip these files/folders for that matter.