Force character encoding

Another character encoding problem from macOS...

Currently, rclone uploads files to remotes with the same encoding as the local file. This means that if I upload from a hard disk formatted as HFS+ (which always forces an NFD encoding), the files on the remote will end up with an NFD encoding.

rclone treats NFC and NFD as equal in the checking process, so it is not really a problem when uploading (although it can be disabled with --no-unicode-normalization).

But, it can be a problem when downloading: if the file is NFD-encoded on the remote, it is possible to download NFD-encoded files on Linux (and Windows?) machines.

Personally, I would like to avoid this, so that the files on the remote always have NFC encoding. Would it be possible a new option to always force NFC encoding when uploading files? Thank you.

What you want is

--local-unicode-normalization Apply unicode NFC normalization to paths and filenames

(which an also be put as a config file variable unicode_normalization under a [local] tag)

Thanks, it never ceases to amaze me how versatile rclone is!

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.