Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SFTP Bug Report] Unable to upload/see files/folders with name "*夹*" #1382

Closed
pandolia opened this issue May 11, 2019 · 5 comments
Closed

Comments

@pandolia
Copy link

pandolia commented May 11, 2019

"OpenSSH for Windows" version
7.9.0.0

Server OperatingSystem
Windows Server 2012 R2 Standard

Client OperatingSystem
Windows 7 Ultimate

Client FTP Software
WinSCP 5.15.1 (Build 9407)
FileZilla 3.42.1

What is failing
1. Upload files/folders with name "*夹*", i.e, "新建文件夹", "123夹", "abc夹abc".
2. See server's files/folders with name "*夹*".

Expected output
Upload/see all kinds of files/folders.

Actual output
1. When uploading a folder "新建文件夹", or a folder "123夹":
20190511095401

2. When listing files/folders of the server, the folder "新建文件夹" and the file "123夹" are lost.

Other Files/Folders
File/folder without "夹" in its name (i.e, "新建文件", "abc", ... ) can be uploaded/seen.

Other Servers
When connecting to an Ubuntu ssh server with WinSCP/FileZilla, all kinds of files/folders can be uploaded/seen.

@nonylours
Copy link

I had the same the problem. Some (but not all) folders/files with Japanese kanjis were invisible with SFTP. I could workaround it by changing the System Locale from Japanese to English in the control panel.

@yuliu
Copy link

yuliu commented Nov 1, 2019

I'm not sure if my problem is related to this one.

I'm using Windows 10's built-in OpenSSH sftp server and connect to it from a remote PC using WinSCP. Some operations fail and I report it to WinSCP. The WinSCP developer checked and found it's Windows sftp server's fault who doesn't send back correct UTF-8 encoded contents.

The post I've posted in WinSCP is here, and the developer's response is:

And that actually what the server returns. Not WinSCP fault.
WinSCP asks the server for a canonical path to /E:/temp/上线前备份 and the server returns /E:/temp/上线前备 followed by an invalid UTF-8 code. That makes WinSCP believe the server does not use UTF-8 encoding and falls back to a legacy encoding, what breaks everything after.
Again, not really WinSCP fault.

The OSes & softwares I'm using are:

@pd12bbf7608ae1
Copy link

I'm not sure if my problem is related to this one.

I'm using Windows 10's built-in OpenSSH sftp server and connect to it from a remote PC using WinSCP. Some operations fail and I report it to WinSCP. The WinSCP developer checked and found it's Windows sftp server's fault who doesn't send back correct UTF-8 encoded contents.

The post I've posted in WinSCP is here, and the developer's response is:

And that actually what the server returns. Not WinSCP fault.
WinSCP asks the server for a canonical path to /E:/temp/上线前备份 and the server returns /E:/temp/上线前备 followed by an invalid UTF-8 code. That makes WinSCP believe the server does not use UTF-8 encoding and falls back to a legacy encoding, what breaks everything after.
Again, not really WinSCP fault.

The OSes & softwares I'm using are:

* local:
  Windows 10 x64 Pro 1903 (18362.449) Chinese
  WinSCP 5.15.5 9925 with Chinese Simplified language pack.

* remote:
  Windows 10 x64 Ent 1903 (18362.449) Chinese
  Windows's built-in OpenSSH server
  with Default shell changed to `C:\Program Files\Git\bin\bash.exe`
  (via https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_server_configuration#configuring-the-default-shell-for-openssh-in-windows )
  Git 2.23.0.windows.1
  OpenSSH SFTP 7.7.2.1 (OpenSSH_7.7p1 for Windows)
  The SFTP server invoked by OpenSSH is `C:\Windows\System32\OpenSSH\sftp-server.exe` which is the Windows's built-in one.

I met the same problem with many non-English character. Sometimes file's name with 【】 or other Chinese and Japanese characters won't display at all. Enter a folder with non-English characters name usually result an error.

It may solve if I choose to use UTF-8 in setting Language for non-Unicode programs, which was Chinese (Simplified, China) before I use the SFTP server. But some of my programs (except SFTP server) won't display Chinese characters correctly under UTF-8.

Is there a solution that I can use UTF-8 code to run OpenSSH server without change setting Language for non-Unicode programs?

The OSes & softwares I'm using are:

server:
Windows 10 x64 Pro 10.0.18363 N/A Build 18363
Windows's built-in OpenSSH server

client:
FileZilla 3.44.2
Windows's built-in OpenSSH client

All Windows's built-in OpenSSH is 7.7.2.2

@maertendMSFT
Copy link
Collaborator

Please try this on the latest release, 8.1: https://github.com/PowerShell/Win32-OpenSSH/releases/tag/v8.1.0.0p1-Beta

@pandolia
Copy link
Author

@maertendMSFT Thank you for fixing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants