You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ rsync --version
rsync version 3.2.7 protocol version 31
Preparing a test file (its name is "test" in Russian):
$ ssh server "touch `echo тест | iconv -f koi8-r -t utf-8`"
$ ssh server "ls `echo тест | iconv -f koi8-r -t utf-8`"
я┌п╣я│я┌
The last line is mojibake — it's Russian "test" in utf-8 shown in koi8-r font:
$ echo тест | iconv -f koi8-r -t utf-8
я┌п╣я│я┌
No problem so far. Now let's rsync it:
$ rsync --iconv=koi8-r,utf-8 server:тест
rsync: [sender] link_stat "/home/phd/тест" failed: No such file or directory (2)
Hmm, pity. IWBN if rsync properly converts file names. But I can live without that. There is a worse problem:
$ rsync --iconv=koi8-r,utf-8 server:"`echo тест | iconv -f koi8-r -t utf-8`"
ERROR: rejecting unrequested file-list name: тест
rsync error: requested action not supported (code 4) at flist.c(1000) [Receiver=3.2.7]
Client rejects the name тест because it originally asked for я┌п╣я│я┌.
IMO it's a bug. Either rsync --iconv=koi8-r,utf-8 should encode file names on sending so that rsync --iconv=koi8-r,utf-8 server:тест works. Or it should check not encoded file names when receiving so that encoded file names passed through the check.
Currently the workaround is to turn off the check:
$ rsync --iconv=koi8-r,utf-8 --trust-sender server:"`echo тест | iconv -f koi8-r -t utf-8`"
-rw------- 0 2024/10/29 00:32:36 тест
--old-args also works. But IMO that are only workarounds.
Upd. For me the best solution would be proper file name encoding in both direction so this would work:
$ rsync --iconv=koi8-r,utf-8 server:тест
-rw------- 0 2024/10/29 00:32:36 тест
The text was updated successfully, but these errors were encountered:
Client and server: Debian 12 bookworm. Client: locale
ru_RU.KOI8-R
, FS encodingkoi8-r
. Server: localeru_RU.UTF-8
, FS encodingutf-8
.Preparing a test file (its name is "test" in Russian):
The last line is mojibake — it's Russian "test" in utf-8 shown in koi8-r font:
No problem so far. Now let's rsync it:
$ rsync --iconv=koi8-r,utf-8 server:тест rsync: [sender] link_stat "/home/phd/тест" failed: No such file or directory (2)
Hmm, pity. IWBN if
rsync
properly converts file names. But I can live without that. There is a worse problem:Client rejects the name
тест
because it originally asked forя┌п╣я│я┌
.IMO it's a bug. Either
rsync --iconv=koi8-r,utf-8
should encode file names on sending so thatrsync --iconv=koi8-r,utf-8 server:тест
works. Or it should check not encoded file names when receiving so that encoded file names passed through the check.Currently the workaround is to turn off the check:
$ rsync --iconv=koi8-r,utf-8 --trust-sender server:"`echo тест | iconv -f koi8-r -t utf-8`" -rw------- 0 2024/10/29 00:32:36 тест
--old-args
also works. But IMO that are only workarounds.Upd. For me the best solution would be proper file name encoding in both direction so this would work:
The text was updated successfully, but these errors were encountered: