The affected places where log.Debug might get called with an invalid encoded filename could use unicode() with "replace" or "ignore".
But it is likely that it will cause another similar error further down in the processing then still, when the filename gets used again.
Duplicity should make sure to use the invalid encoded filename when backing up the file, and restore it given the original filename.
I think that the different cases reported here should get added as separate test cases to Duplicity first, so that proper fixes for them can be added then to make the tests pass.
The affected places where log.Debug might get called with an invalid encoded filename could use unicode() with "replace" or "ignore".
But it is likely that it will cause another similar error further down in the processing then still, when the filename gets used again.
Duplicity should make sure to use the invalid encoded filename when backing up the file, and restore it given the original filename.
I think that the different cases reported here should get added as separate test cases to Duplicity first, so that proper fixes for them can be added then to make the tests pass.