Hebrew character convert error while put thru ftp

Hi all ,
i have a script which cp xml files from linux to other server thru ftp
my xml file contains charcters in hebrew . my script is

#!/bin/bash
HOST="....."
USER="....."
PASSWORD="..."
cd /usr2/app/naama/
filelist='find . -mmin -60 | tail -n +2 | awk -F "/" '{print $2}' | grep xml'
for i in $filelist; do
ftp -p -n $HOST << EOF
user $USER $PASSWORD 
cd /dest/files4/
put $i
EOF
done

the encoding of the file is "UTF-16"
when i'm trying to open the file it's gives me undefined charcters insted of the hebrew .
please your help
thanks in advanced ,
Naama

try adding before put $1 line: bin

If you want ftp to not change the file content then you need to use binary transfer instead of ascii. So try:

ftp -p -n $HOST << EOF
user $USER $PASSWORD 
binary
cd /dest/files4/
put $i
EOF

There are some cases when the script does Error converting from Hebrew to Jibrish.Even Though we put the Binary Command .

ftp -p -n $HOST << EOF
user $USER $PASSWORD 
binary
cd /dest/files4/
put $i
EOF

Please you help .
Thanks .