[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [gftp] Codepage related problems.

Hi Alexander,
   Thanks for the patches. I commited them to CVS.


On 3/22/07, Alexander Orlov < alxorlov@xxxxxxxxx> wrote:
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 @@
     len = endpos - *curpos + 1;

-  for (retlen = len - 1;
+  for (retlen = len;
        (*curpos)[retlen - 1] == ' ' || (*curpos)[retlen - 1] == '\t';

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
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