Open yotann opened 2 years ago
Both Borg and Restic handle this correctly (preserving the bytes). I'm not sure exactly how they store filenames.
Options that occur to me:
name
field contains normal Unicode or base64-encoded bytes.name
field as is, and add a new field name_bytes
that holds the original bytes when necessary.\x00
or /
as escape codes in the name
field, making something like "name": "/base64:/w=="
.Thanks for the report. We should definitely fix that, i'm wondering how this may behave in Windows, which uses Unicode filenames only.
When using a UTF-8 locale on Linux, Kopia gets confused by filenames that aren't valid UTF-8. It replaces the non-UTF-8 bytes with the replacement character U+FFFD, making it impossible to recover the original filename. Ideally, Kopia would preserve the original bytes of the filename, but if nothing else it should log an error message.