Operating System - HP-UX
1837117 Members
2268 Online
110112 Solutions
New Discussion

Special characters not transfering right using ftp

 
SOLVED
Go to solution
Kent Pirkle
Occasional Contributor

Special characters not transfering right using ftp

I have a file that is being transferred via ftp. On the host machine (MVS) the file shows the correct character set. Once transferred, the special character is wrong. This file is in the Danish language. A PC transfering the file doesn't have this problem. Are there special locale settings I can change on the HP-UX client side to fix this?
7 REPLIES 7
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Special characters not transfering right using ftp

If you transfer using binary the data is actually unaltered (i.e. the binary values are not tranlated in any way) but that does not mean that the data is then displayed correctly. That depends upon the LOCALE settings and the fonts that are available.
If it ain't broke, I can fix that.
Martin Johnson
Honored Contributor

Re: Special characters not transfering right using ftp

Your HP-UX to PC transfer works correctly because you are going from one ASCII machine to another. FTPs to the mainframe are converted to EBCDIC, usually on the mainframe. You will need to locate the translation map and modify it.


HTH
Marty
Dietmar Konermann
Honored Contributor

Re: Special characters not transfering right using ftp

Maybe the default transfer type is ASCII on the MVS? Try to set "bin" explicitely before transferring.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
Kent Pirkle
Occasional Contributor

Re: Special characters not transfering right using ftp

Actually, its the MVS to PC transfer that works. The MVS to HP-UX transfer is the one that doesn't come across correctly.
Kent Pirkle
Occasional Contributor

Re: Special characters not transfering right using ftp

It's definitely not the visible language settings. I can copy the file from the HPUX box and it looks the same on the PC. If I copy the PC file to the HPUX box it looks right under HPUX. I tried binary, but got the same results.
benoit Bruckert
Honored Contributor

Re: Special characters not transfering right using ftp

Hi,
You can transfer in binary mode and then make a dd to convert ebcdic to ascii.(see man dd)
But you may have to work on a map for the conversion if you have specifics characters...
hope that help
Benoit
Une application mal pansée aboutit à une usine à gaze (GHG)
Kent Pirkle
Occasional Contributor

Re: Special characters not transfering right using ftp

Thanks for the help everyone. The answer appears to be to use binary file transfer using ftp then use the iconv utility:

iconv -f cp037 -t iso81 infile > outfile

This yielded what I was wanting.