FTP files containing Chinese characters from windows env to unix env

Rakesh B

New Member
Hi,
I Need help on this Urgently!!! Currenty we are trying to ftp files from windows env to Unix env using ftp (os-command). The Chines characters appear as junk characters in the receiving system. We also tried using the bi command(Binary mode). But this did not work. Can you please help me as ASAP?
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
What happens when you FTP the same files manually from Windows to Unix? And what versions of Progress, Windows, and Unix are you referring to?
 

Rakesh B

New Member
Thanks for the Reply!!! The Chinese Characters are replaced by some junk characters like ?*. Am using 9.1D version of Progress. The FTP is from a windows SYSTEm to UNIX based system. The File is fine in the Source system. At the Recieving end we are facing this problem.
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
Again, what happens when you manually (i.e. outside of Progress) binary FTP the file from the Windows system to the Unix? That should work.

Also, how are you viewing the file on the receiving end to determine its content? And have you compared the sizes of the files at each end?
 

Rakesh B

New Member
Yes its working manually.When I try the same thing in a script it does not work for some reason. I am viewing the files in Wordpad. In the source system file i am able to view the chinese charateers. In the recieving system when I view the the file in word pad Junk characters appear. I compared the files sizes and they are same.
 

Rakesh B

New Member
i just found out that this works for a limited size of File. When the file is more than 3kb the chinese characters in the files start appearing as junk. Is such a scenario possible???
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
When the file is more than 3kb the chinese characters in the files start appearing as junk.
I don't see why this would happen. FTP in binary mode reliably transmits multi-gigabyte files with perfect fidelity.

Tell me the exact command that you are using to FTP the file from the ABL, as well as the command you are using to test the manual FTP transmission.

Also, you said you are using Wordpad to view the file on the Unix side. I wouldn't use this as a reliable test, as you are transmitting the file back to Windows via some transport (SMB or NFS) to do that. Also, any text viewer/editor (notepad, wordpad, vi, etc.) is showing you an interpretation of the data. You want to see the actual data, i.e. the file's byte values. Use a hex editor on Windows, or look at the output of the xxd command in Unix.
 

Rakesh B

New Member
*************The Script am using ********
open (ip address)
userid
password
cd to some server folder in the server
bi
put file name
bye
quit
*********End of Script *************

I then connect manually establish a ftp conection to the server and get the File in BINARY mode to my local and open it with wordpad

When I tried this with a 1 kb file with just 2-3 lines it it it worked just fine

What could be the problem??? Am i missing somethin? I do not have telnet access to the server so as to go to unix and read the file. The only option is get download it to local and verify.
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
If you don't have access to the system your options are limited. Maybe someone who can access the system can help you.

I would try to manually put the file to the Unix system and then get it back with a different file name, then do a binary diff of the files. Again, that should work.

Then try the same thing, but use ABL to put the file and then FTP to manually get the file, with a different name. Then binary diff the sent file and the received file on Windows. Also, compare their sizes.
 
Maybe your doc which you want to FTP from Window to Unix is GB codepage or BIG5 codepage,BUT your unix environment can not support this kinds codepage, you can try translate the doc into UTF 8 codepage, then try FTP.
 
Top