Mhh, 'home/bigon/incapacit\xe9_0614.jpg' is coming from duplicity and is obviously latin1.
When modifying the unf() function from
def ufn(filename):
"Convert a (bytes) filename to unicode for printing"
assert not isinstance(filename, unicode)
return filename.decode(sys.getfilesystemencoding(), 'replace')
to
def ufn(filename):
"Convert a (bytes) filename to unicode for printing"
assert not isinstance(filename, unicode)
return filename.decode('latin1', 'replace')
The string is being encoded as: 'home/bigon/incapacit\xc3\xa9_0614.jpg', which is valid utf8
Mhh, 'home/bigon/ incapacit\ xe9_0614. jpg' is coming from duplicity and is obviously latin1.
When modifying the unf() function from
def ufn(filename): filename, unicode) decode( sys.getfilesyst emencoding( ), 'replace')
"Convert a (bytes) filename to unicode for printing"
assert not isinstance(
return filename.
to
def ufn(filename): filename, unicode) decode( 'latin1' , 'replace')
"Convert a (bytes) filename to unicode for printing"
assert not isinstance(
return filename.
The string is being encoded as: 'home/bigon/ incapacit\ xc3\xa9_ 0614.jpg' , which is valid utf8