unicode filenames, "cannot find the file specified", odd beh

Advertisement

TS
Guest

unicode filenames, "cannot find the file specified", odd beh

I read https://winscp.net/eng/docs/faq_utf8, and if I understand it right, WinSCP should be able to transfer and synchronize files with unicode names even though they may not display correctly. Is that right?

I am trying to copy (sftp) a file from A to B (both Windows machines). The destination directory is empty and there are no spaces in the directory path. If the filename contains either a μ (U+0x03BC) or µ (U+0x00B5) character, WinSCP (this is 4.1.8 b415 on WinXP) copies the file then asks "Remote file 'Foo 1µV.dat' already exists. Overwrite?" Since the directory was empty, there is nothing to overwrite and this is unexpected behavior. Regardless of the answer given -- even append -- the file appears to transfer correctly.

When trying to copy a file from A to B where the destination directory path has a space in it, files with µ (U+0x00B5) transfer correctly -- without asking about overwriting the file. Files with μ (U+0x03BC) will not transfer, reporting "System Error. Code 2. The system cannot find the file specified."

Further, if two files are transferred together or in series, one named 'Foo 1µV.dat' (U+0x00B5) and another 'Foo 1μV.dat' (U+0x03BC), the second file transferred will incorrectly overwrite the former, instead of creating a new file as it should.

If both versions of the filename already exist on the server, WinSCP always downloads the U+0x00B5 version, even if the U+0x03BC file was selected. This means a filename containing μ (U+0x03BC) cannot be transferred from the server, throwing "No such file or directory. Error code: 2. Error message from server (en): SfsStatusCode.NoSuchFile. Request code: 3."

Other sftp clients connecting to the same server, have no issues with any of the above scenarios.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

Re: unicode filenames, "cannot find the file specified", odd beh

TS wrote:

I read https://winscp.net/eng/docs/faq_utf8, and if I understand it right, WinSCP should be able to transfer and synchronize files with unicode names even though they may not display correctly. Is that right?
Not completely. It work only as long as converting unicode name to local ansi encoding and back does not corrupt the file name. If it does, you will be behaviour which you describe.

I am trying to copy (sftp) a file from A to B (both Windows machines). The destination directory is empty and there are no spaces in the directory path. If the filename contains either a μ (U+0x03BC) or µ (U+0x00B5) character, WinSCP (this is 4.1.8 b415 on WinXP) copies the file then asks "Remote file 'Foo 1µV.dat' already exists. Overwrite?" Since the directory was empty, there is nothing to overwrite and this is unexpected behavior. Regardless of the answer given -- even append -- the file appears to transfer correctly.
Except for this. I have no explanation. Can you provide me your email address, so I can send you a debug version of WinSCP to track the problem? If you do not want to post the address here, you can send me an email. You will find it (if you log in) in my forum profile. Please include link to this topic. Thanks.

Reply with quote

TS
Joined:
Posts:
8

Hm. Even after creating a login, I don't see your email on your profile page. But I found an email and sent (hopefully) you a message.

Reply with quote

martin
Site Admin
martin avatar

TS wrote:

Hm. Even after creating a login, I don't see your email on your profile page. But I found an email and sent (hopefully) you a message.
Sorry, I haven't received anything. Please check the profile again. The address is obviously there ;-)

Reply with quote

kenlo
Guest

unicode file name problem

Hi, I have a similar problem when copying files between WinXP and Ubuntu Hardy with v4.1.8 (build 415).

If a filename have "?" in it, it can't be copied though everything is perfectly OK under the respective file managers. WinXP -> Hardy "system error code 123" will popup. The other way round, "a call to an OS function failed" will popup.

No "?" in the filename - it can be copied but cannot retain the filename. The new filename will have "?" in it. And Hardy will append "(invalid encoding)" to the filename.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

Re: unicode file name problem

kenlo wrote:

Hi, I have a similar problem when copying files between WinXP and Ubuntu Hardy with v4.1.8 (build 415).

If a filename have "?" in it, it can't be copied though everything is perfectly OK under the respective file managers. WinXP -> Hardy "system error code 123" will popup. The other way round, "a call to an OS function failed" will popup.

No "?" in the filename - it can be copied but cannot retain the filename. The new filename will have "?" in it. And Hardy will append "(invalid encoding)" to the filename.
What protocol?

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

Re: unicode file name problem

kenlo wrote:

sftp
OK, so I suppose that your server is OpenSSH, right?
OpenSSH does not announce support of UTF-8. If your server uses UTF-8 natively, you need to force WinSCP to use it. Please read FAQ.

Reply with quote

Advertisement

popins
Guest

Re: unicode file name problem

TS wrote:

WinSCP should be able to transfer and synchronize files with unicode names even though they may not display correctly.

Similar problem here.

I'm accessing the server (sftp) from two Windows computers. Some folders have unicode names. WinSCP is the same (portable, version 4.1.9 b416).

One OS is localized, everything works fine. The other OS is in English, with Default input language and keyboard set to my locale. Here, for unicode named folders I get "No such file or directory.; Error code: 2; Error message from server: No such file; Request code: 16".
Other folders work fine.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

Re: unicode file name problem

popins wrote:

One OS is localized, everything works fine. The other OS is in English, with Default input language and keyboard set to my locale. Here, for unicode named folders I get "No such file or directory.; Error code: 2; Error message from server: No such file; Request code: 16".
Other folders work fine.
Please read FAQ, particularly the Remark section. If that does not help, come back.

Reply with quote

nhk
Joined:
Posts:
1

Hi, I have a similar problem. I am trying to transfer files from Ubuntu server to Windows 7 (Korean locale). I turned on the option to force WinSCP to use UTF-8. After I made this change, I could transfer files named in Korean. However non-Korean unicode file names still gives me the msg "could not open remote file".

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

nhk wrote:

Hi, I have a similar problem. I am trying to transfer files from Ubuntu server to Windows 7 (Korean locale). I turned on the option to force WinSCP to use UTF-8. After I made this change, I could transfer files named in Korean. However non-Korean unicode file names still gives me the msg "could not open remote file".
That's expected behaviour. It is explained in the FAQ.

Reply with quote

Advertisement

Guest

martin wrote:

nhk wrote:

Hi, I have a similar problem. I am trying to transfer files from Ubuntu server to Windows 7 (Korean locale). I turned on the option to force WinSCP to use UTF-8. After I made this change, I could transfer files named in Korean. However non-Korean unicode file names still gives me the msg "could not open remote file".
That's expected behaviour. It is explained in the FAQ.

According to the FAQ this is true for *displaying* file names but is there really no way to copy all files with unicode names?

Reply with quote

martin
Site Admin
martin avatar

Anonymous wrote:

According to the FAQ this is true for *displaying* file names but is there really no way to copy all files with unicode names?
In some cases it won't work.

Reply with quote

Advertisement

You can post new topics in this forum