On 21.12.2007  9:48, Alexander V. Lukyanov wrote:
> On Thu, Dec 20, 2007 at 09:41:09PM +0100, Daniel Grund wrote:
> > I cannot get lftp to download a file that has a german umlaut in its
> > name. It neither works with an explicit charset setting nor without it.

> First you have to check which encoding the ftp server uses. Turn on debug,
> see if UTF8 mode is activated. Do ls to a file and inspect the encoding
> without charset settings.

Thanks for your answer, Alexander.

The debug output from lftp 3.6.1 is:

> ---- Verbinde mit <server> Port 21
> <--- 220-FTP server ready.
> <--- 220 This is a private system - No anonymous login
> ---> FEAT
> <--- 211-Extensions supported:
> <---  EPRT
> <---  IDLE
> <---  MDTM
> <---  SIZE
> <---  REST STREAM
> <---  MLST
> type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
> <---  MLSD
> <---  TVFS
> <---  ESTP
> <---  PASV
> <---  EPSV
> <---  SPSV
> <---  ESTA
> <---  AUTH TLS
> <---  PBSZ
> <---  PROT
> <---  UTF8
> <--- 211 End.
> ---> AUTH TLS
> <--- 234 AUTH TLS OK.
> ---> OPTS UTF8 ON
> Certificate depth: 0; subject: <certificate subject info>
> issuer: <certificate issuer info>
> WARNING: Certificate verification: self signed certificate
> <--- 200 OK, UTF-8 enabled
> ---> OPTS MLST type;size;modify;UNIX.mode;UNIX.uid;UNIX.gid;
> <--- 200  MLST OPTS
> type;size;sizd;modify;UNIX.mode;UNIX.uid;UNIX.gid;unique;
> ---> USER <user>
> <--- 331 User <user> OK. Password required
> ---> PASS <pass>
> <--- 230-User <user> has group access to:  <group>
> <--- 230 OK. Current restricted directory is /
> ---> PWD
> <--- 257 "/" is your current location
> ---> PBSZ 0
> <--- 200 PBSZ=0
> ---> PROT P
> <--- 534 Fallback to [C]
> ---> PASV
> <--- 227 Entering Passive Mode (<ip>)
> ---- Verbinde Daten Socket mit (<ip>) Port 60435
> ---- Data connection established
> ---> LIST
> <--- 150 Accepted data connection
> ---- Got EOF on data connection
> ---- Schließe den Daten Socket

The server seems to be using UTF-8. lftp automatically chose the file:charset 
ISO8859-15
for itself. ftp:charset is not set.

The ls debug output of lftp is:

> ---> PROT P
> <--- 534 Fallback to [C]
> ---> PASV
> <--- 227 Entering Passive Mode (<ip>
> ---- Verbinde Daten Socket mit (<ip>) Port 53872
> ---- Data connection established
> ---> LIST <path>
> <--- 150 Accepted data connection
> <--- 226-Options: -a -l

The filename still shows up with a questionmark instead of the german
umlaut that FreeBSD's builtin ftp shows.

I then tried setting ftp:charset to UTF-8 as well as unsetting the shell
variables LC_ALL, LANG and MM_CHARSET before connecting with lftp.
Both did not help.

-- 
Daniel

Reply via email to