Hello, Currently there are a lot of ftp servers with different charsets and it is a problem to work with these hosts if local encoding differs, only for Russian there are over 10 different encoding and 3 of them are widely used. So I made a patch which allows to select remote server's encoding and recode URL into it. I've found that function for filename recoding already exists: filename_recode() in mp_msg.c, so I changed it in order to recode from arbitrary initial encoding to arbitrary final one. I extracted common part to filename_recode_common() and added iconv error handling routines (otherwise iconv silently fails if e.g. incorrect encoding is specified.). iconv_t handlers are separate for each "branch" of convertios, because both strcmp() and iconv_open()/iconv_close() are expensive operations to be performed each time. This is what the first patch supposed to do. The second patch is just cosmetics required after the first patch. The third patch is ftp URL recoding support itself utilizing the first patch. And the fourth patch is man page update describes new -ftp-charset option. Currently user must specify encoding on his/her own, but in several cases it is possible to autodetect encoding: 1) Negotiation with server using LANG feature (rfc2640) if server supports it. 2) Alternatively try to server's guess encoding by descendingly parsing directories in URL (starting from /) in order to identify encoding using ENCA. This will be implemented later, I hope.