NppFTP icon indicating copy to clipboard operation
NppFTP copied to clipboard

Non-ANSI characters in file name produce errors

Open Ohar opened this issue 9 years ago • 14 comments

I can't download file with unicode file name (e. g. cyrillic) via NppFTP. I can create it on the server side, also I can upload it to the server side. But I can't donwload it from server side

Example: I mistyped in file name and can`t change it or even read it now via NppFTP.

-> RETR /example.com/сonfig.php  
550 /example.com/сonfig.php: No such file or directory
Download of /example.com/сonfig.php failed

Ohar avatar Aug 25 '15 10:08 Ohar

+1 https://github.com/ashkulz/NppFTP/issues/50

En: Usually in clients put a choice of the coding of the server. In NppFTP it isn't present. Rus: Обычно в клиентах ставят выбор кодировки сервера. В NppFTP этого нет.

AutopilotNN avatar Aug 25 '15 12:08 AutopilotNN

I think the problem is in this line: m_localName = SU::Utf8ToTChar(m_name); //FileObject.cpp:71 As I can understand, it's utf-8 to ansi transition. Please leave filename in utf-8 - I hope it will solve the problem.

wandererkh avatar Dec 18 '17 23:12 wandererkh

@wandererkh Do you know a public available FTP server to test this against?

chcg avatar Dec 19 '17 18:12 chcg

@chcg I've sent you credentials for private account on e-mail, thank you

wandererkh avatar Dec 19 '17 19:12 wandererkh

Also fails on ftp:heise.de with anonymous at:

200 Switching to Binary mode.
-> SIZE /pub/konferenzen/ipv6-2014/Donnerstag_22052014/In-Depth/Weber_2014-05-22 Zugehörigkeit von MAC- und IPv6-Adressen speichern.pdf  
550 Could not get file size.
-> PASV  
227 Entering Passive Mode (193,99,144,79,97,64)
-> RETR /pub/konferenzen/ipv6-2014/Donnerstag_22052014/In-Depth/Weber_2014-05-22 Zugehörigkeit von MAC- und IPv6-Adressen speichern.pdf  
550 Failed to open file.
Download of /pub/konferenzen/ipv6-2014/Donnerstag_22052014/In-Depth/Weber_2014-05-22 Zugehörigkeit von MAC- und IPv6-Adressen speichern.pdf failed

chcg avatar Dec 19 '17 22:12 chcg

I've found FTP_synchronize plugin: https://sourceforge.net/projects/npp-plugins/files/FTP_synchronize/ It can read content of these files and folders, but can't upload after editing. FTP_synchronize_0_9_5_0_src.zip has source codes

wandererkh avatar Dec 24 '17 19:12 wandererkh

I've chosen profile cache folder and now FTP_synchronize can upload files after editing

wandererkh avatar Dec 26 '17 13:12 wandererkh

See https://tools.ietf.org/html/draft-ietf-ftpext-utf-8-option-00 and https://www.ghisler.ch/board/viewtopic.php?t=22402. So OPTS UTF8 ON could be actively used by the client to request UTF8 and check the response. Maybe later on there will be the need to really check if the server supports UTF-8, for now just assume if UTF8 is received it could also be used to access the dir or file with UFT8.

chcg avatar Dec 27 '17 21:12 chcg

@chcg thanks a lot! Now I can see utf-8 filenames and foldernames and read it's content. Next step - it saves downloaded files and folders with non-utf-8 names and because of this it can't upload it right after edit. Please fix it later and have a Happy New Year )

wandererkh avatar Dec 27 '17 22:12 wandererkh

@wandererkh Thanks for testing. Will try to tackle also the upload issue.

chcg avatar Dec 28 '17 00:12 chcg

First part released with https://github.com/ashkulz/NppFTP/releases/tag/v0.27.4

chcg avatar Mar 29 '18 17:03 chcg

Strange things happen. In folder tree I see correct file names in Russian. When I doubleclick on one of them, NppFTP downloads it and save in cache with garbage in file name. But Notepad++ still can work with it. When I edit and save file, NppFTP uploads it to server with broken file name so it appears as new file with garbage in file name.

Looks like something goes wrong while NppFTP downloads file and save it to cache, Somewhere where NppFTP choose file name for cache.

0.27.4 release doesn't fix this problem: it's same as in 0.26 version.

My environment is Windows XP SP3 on local machine with Notepad++ 7.5.3 and Ubuntu 14.04.5 LTS on server.

Linda-chan avatar Jun 09 '18 05:06 Linda-chan

Known remaining issue as written above. With v0.27.4 just the download issue is fixed.

chcg avatar Jun 10 '18 06:06 chcg

[SFTP] Successfully authenticated Download of /root/1/中文资料.lua succeeded, opening file. Download the file name error Save this file A new file name appears nppftp version 0.30.1

heyue07 avatar Nov 29 '19 05:11 heyue07