Opened 14 years ago

Closed 13 years ago

Last modified 10 years ago

#5264 closed Bug report (rejected)

some files with chinese name can't upload

Reported by: yanruichen Owned by:
Priority: normal Component: FileZilla Server
Keywords: chinese charater upload Cc: gelnyang@…
Component version: Operating system type: Windows
Operating system version: Windows 7

Description

When I failed to upload some files to server by IE, meanwhile some others can be uploaded. If I change the chinese names of the files to english names or some other chinese names , they can be uploaded. According to the log, the file names in the command STOR is wrong. (But the file names in the command DELE is right.) Although the file can be uploaded by other ftp clients, I don't think IE is wrong. I can upload the same files to other ftp server by IE.
STOR 2010?月装机统?xls
DELE 2010年1月装机统计.xls

(000023) 2010-03-11 21:23:23 - share (134.33.5.51)> TYPE I
(000023) 2010-03-11 21:23:23 - share (134.33.5.51)> 200 Type set to I
(000023) 2010-03-11 21:23:23 - share (134.33.5.51)> PASV
(000023) 2010-03-11 21:23:23 - share (134.33.5.51)> 227 Entering Passive Mode (134,33,5,252,14,169)
(000023) 2010-03-11 21:23:23 - share (134.33.5.51)> STOR 2010?月装机统?xls
(000023) 2010-03-11 21:23:23 - share (134.33.5.51)> 150 Connection accepted
(000023) 2010-03-11 21:23:23 - share (134.33.5.51)> 550 can't access file.
(000025) 2010-03-11 21:23:23 - (not logged in) (134.33.5.51)> Connected, sending welcome message...
(000025) 2010-03-11 21:23:23 - (not logged in) (134.33.5.51)> 220-FileZilla Server version 0.9.34 beta
(000025) 2010-03-11 21:23:23 - (not logged in) (134.33.5.51)> 220-written by Tim Kosse (Tim.Kosse@…)
(000025) 2010-03-11 21:23:23 - (not logged in) (134.33.5.51)> 220-Please visit http://sourceforge.net/projects/filezilla/
(000025) 2010-03-11 21:23:23 - (not logged in) (134.33.5.51)> 220 Welcome to yanruichen' FTP site
(000025) 2010-03-11 21:23:23 - (not logged in) (134.33.5.51)> USER share
(000025) 2010-03-11 21:23:23 - (not logged in) (134.33.5.51)> 331 Password required for share
(000025) 2010-03-11 21:23:23 - (not logged in) (134.33.5.51)> PASS *
(000025) 2010-03-11 21:23:23 - share (134.33.5.51)> 230 Logged on
(000025) 2010-03-11 21:23:23 - share (134.33.5.51)> opts utf8 on
(000025) 2010-03-11 21:23:23 - share (134.33.5.51)> 200 UTF8 mode enabled
(000025) 2010-03-11 21:23:23 - share (134.33.5.51)> PWD
(000025) 2010-03-11 21:23:23 - share (134.33.5.51)> 257 "/" is current directory.
(000025) 2010-03-11 21:23:23 - share (134.33.5.51)> DELE 2010年1月装机统计.xls
(000025) 2010-03-11 21:23:23 - share (134.33.5.51)> 550 File not found
(000025) 2010-03-11 21:23:25 - share (134.33.5.51)> disconnected.

Change History (5)

comment:1 by Geln Yung, 14 years ago

Cc: gelnyang@… added
Keywords: chinese charater upload added; wrong file name removed
Operating system version: XPWindows 7

I meet the same problem.

comment:2 by Tim Kosse, 14 years ago

Status: newmoreinfo

Browsers only have rudimentary FTP support. Can you please retry this using a proper stand-alone FTP client?

in reply to:  2 comment:3 by Geln Yung, 14 years ago

Replying to codesquid:

Browsers only have rudimentary FTP support. Can you please retry this using a proper stand-alone FTP client?

Yes,It's ok for other client like the default ftp tool of windows. I meet the problem when using the apache common FTPClient.The following is the code:


ftpclient.changeWorkingDirectory(path);
ftpclient.enterLocalPassiveMode();
ftpclient.setControlEncoding("UTF-8");
ftpclient.setFileType(FTPClient.BINARY_FILE_TYPE);
ftpclient.storeFile(fileName, new FileInputStream(localFilePath));



comment:5 by yanruichen, 13 years ago

Cc: yanruichen@… added

Now, I know the reason is that IE don't support file name in unicode. When I download file from my Django server, I need to check the type of the client. If the client is IE, file name in GBK is needed. IF the client is firefox and others, file name in unicode is used. So I guess Only when the FTP server get the type of the FTP client and response diferently, the problem can be solved.

comment:6 by yanruichen, 13 years ago

Cc: yanruichen@… removed
Resolution: rejected
Status: newclosed

Accoring the TCP/IP frame sniffered on the Ethernet, the file name encoded in unicode by IE is wrong. If the file name contains chinese and ascii, the file name uploaded is wrong. When the file name contains only chinese characters or ascii characters, the file name is right. It is irrelevant to the server!

Note: See TracTickets for help on using tickets.