Hello, everybody! New post-2.0.18 gFTP is perfect! Almost all codepages related problems are gone. But some are still exist. First of all there is a little error in lib/protocols.c When I set "remote_charsets=CP1251" in configuration, function _gftp_get_next_charset returns just "CP125". The solution should be: --- lib/protocols.c (revision 904) +++ lib/protocols.c (working copy) @@ -427,7 +427,7 @@ else len = endpos - *curpos + 1; - for (retlen = len - 1; + for (retlen = len; (*curpos)[retlen - 1] == ' ' || (*curpos)[retlen - 1] == '\t'; retlen--); The second problem. For example, I open some remote FTP server with codepage CP1251. gFTP tries to convert name "anonymous" from UTF-8 to CP1251, and initializes request->iconv. But then it tries to use the same request->iconv to convert remote filenames back from CP1251 to UTF-8, and it fails. So, I think, that there should be two iconv's: request->iconv_to and request->iconv_from. Atached file gftp.patch-2 is a solution for this problem (it works perfectly for me). It is selfexplainable, I think. Thank you, for a such good program! P.S. Sorry, for my poor english. -- Alexander Orlov
Attachment:
gftp.patch-1
Description: Binary data
Attachment:
gftp.patch-2
Description: Binary data