>From bruce . furber: > I want to use wget to transfer files from an IBM mainframe FTP server > which stores files in EBCDIC to Linux on our S390X machine. > > Even though I use the type=a option, the files are transferred in Binary > (EBCDIC). The .listing files are OK in ASCII.
As wget 1.10.2 is written (and "-d" should show), specifying ";type=a" will request an ASCII transfer ("TYPE A") instead of the default IMAGE transfer ("TYPE I"), but the standard wget code does not process the received data properly. That is, it does not adjust the line endings, and it certainly does no EBCDIC-ASCII code conversion. (Not adjusting the line endings does allow it to do "-c" continuation easily, which would be either unreliable or very difficult if the data were processed properly upon receipt.) My VMS-compatible wget 1.10.2c will adjust the line endings (for a UNIX or VMS host -- I don't care about "-c"), but that still won't convert EBCDIC to ASCII. Of course, everything depends on what the FTP _server_ does when it gets a request for an ASCII transfer. Assuming that wget really _is_ requesting ASCII and you're still getting EBCDIC, then you're probably doomed to use some external EBCDIC-ASCII code converter program. Example "-d" output showing default and "type=a" behavior: alp $ wget -d ftp://alp-l/wget/wget-1_9_1e_vms/vms_notes.txt DEBUG output created by Wget 1.10.2c built on VMS V7.3-2. --23:10:29-- ftp://alp-l/wget/wget-1_9_1e_vms/vms_notes.txt => `vms_notes.txt' [...] 257 "SYS$SYSDEVICE:[ANONYMOUS]" is current directory. done. ==> TYPE I ... --> TYPE I 200 TYPE set to IMAGE. [...] While, on the othet hand: alp $ wget -d ftp://alp-l/wget/wget-1_9_1e_vms/vms_notes.txt;type=a DEBUG output created by Wget 1.10.2c built on VMS V7.3-2. --23:10:11-- ftp://alp-l/wget/wget-1_9_1e_vms/vms_notes.txt;type=a => `vms_notes.txt' [...] 257 "SYS$SYSDEVICE:[ANONYMOUS]" is current directory. done. ==> TYPE A ... --> TYPE A 200 TYPE set to ASCII. [...] ------------------------------------------------------------------------ Steven M. Schweda [EMAIL PROTECTED] 382 South Warwick Street (+1) 651-699-9818 Saint Paul MN 55105-2547