Hebrew converted into jibrish while put command


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Hebrew converted into jibrish while put command
# 1  
Old 05-03-2018
Hebrew converted into jibrish while put command

HI Friends ,
I have a script which cp xml files from linux to other server thru ftp
my xml file contains charcters in hebrew
although , the command Binary exists in the script . the files contains Undefined Charcters after converting.
script :
Code:
ftp -p -n $HOST << EOF
user $USER $PASSWORD 
binary
cd /dest/files4/
put $i
EOF

PLease your Help ,
Thanks in Advanced
# 2  
Old 05-03-2018
What's the locale settings on either side?
# 3  
Old 05-03-2018
the source server linux UTF-8
the destination server FTP : windows-1252.
# 4  
Old 05-03-2018
I know too little about w-1252 to say "see?", but you might need to convert the text from utf-8 to the destination locale. Try recode or iconv.
On top, I'm afraid w-1252 is not apt to represent the Hebrew language.

Last edited by RudiC; 05-03-2018 at 05:56 AM..
# 5  
Old 05-03-2018
HI ,
thank you for your quick reply .
First of all when i'm copying the file manually , without the script . the file transfer great. you can see the hebrew in the ftp server.
the problem exists only by transfering it by the script.
I shall emphasis that the script user to work just fine .
Inside the xml file the title is encoding="utf-16"
but maybe the binary mode doesn't cover all the oppurtunity of characters, othere than that I don't see whay it stopped to conver the file successfully .
can you please donate me a little bit info about the "recode" or "iconv"
do i nedd to put it instead of binary or in addition ?
THanks in Advanced
Naama

Last edited by naamas03; 05-03-2018 at 06:34 AM..
# 6  
Old 05-03-2018
The text file transferred fine, unless their FTP server doesn't honor the binary command. The receiver just isn't reading it right. Maybe something is wrong with the way you've set up the xml and it's not understanding what character set it should be in. Maybe it doesn't possess that character set. Or maybe the program they're using to read it just isn't capable of translating character sets at all.

reconv and iconv are external utilities you could use to change a file's character set before transmission.
This User Gave Thanks to Corona688 For This Post:
# 7  
Old 05-04-2018
Quote:
Originally Posted by naamas03
HI , Inside the xml file the title is encoding="utf-16"
Is the entire file really UTF-16? That's not a byte-coded character set, it's completely incompatible with ANSI. It won't start <?xml, it will be spaced out into 16-bit characters i.e. < NULL ? NULL x NULL m NULL l NULL, etc. An XML processor won't even be able to understand the declspec.

Try encoding it in UTF-8 instead. That's compatible enough with ANSI that the character set declaration won't be mangled.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

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'... (3 Replies)
Discussion started by: naamas03
3 Replies

2. Shell Programming and Scripting

Shell script variable $1 used with put command

I have the following script used, i am new to shell scripting. tryign to understand. in the put $BASE_FOLDER/$base_name holds which path. What does it mean by $1 second path in put command is it constructing this path: /user/hive/warehouse/stage.db/$1 what is $1 holding in above path. ... (2 Replies)
Discussion started by: cplusplus1
2 Replies

3. Linux

Not able to put ls -lR command in background

Hi All, i am trying to put ls -lRt command to run in the background but it fails. i continue to get output on screen and didnt get the command prompt right after i put the command in background. command i am using is ls -lRt & i am using bash. Can someone let me know how to... (6 Replies)
Discussion started by: omkar.jadhav
6 Replies

4. Shell Programming and Scripting

How to put output of one command into a variable

Hi, Let say I have these 3 files (state, list and myscript). I want to be able get the sample output like below when I run myscript. Any one know how to fix the code? TIA. ~~~~~~~~~~~~~~~ > cat /home/state CA > cat /home/list CA 100 50 20 AUS 120 61 10 > cat myscript... (6 Replies)
Discussion started by: joker_789us
6 Replies

5. Shell Programming and Scripting

Status of FTP Put command

Can i capture the status of put command after i ftp a file? (4 Replies)
Discussion started by: aixjadoo
4 Replies

6. UNIX for Dummies Questions & Answers

FTP put command problem

Hello,I am trying to put something on the ftp server using the put command. Whenever I try, I get this error: ftp> put SIMS.war local: SIMS.war remote: SIMS.war 200 PORT command successful 553 Can't open that file: Permission denied I have set rwx for all on that file and I still am... (3 Replies)
Discussion started by: mojoman
3 Replies

7. UNIX for Dummies Questions & Answers

put command issues with a tftp server

From a remote client, I'm trying to create a timestamped directory and put a file inside the directory. The directory and the file are not present already inside the tftp server. If I need to put a file inside a tftp server, which is not existing already what should I need to do.. I face errors... (9 Replies)
Discussion started by: Amudha
9 Replies

8. Shell Programming and Scripting

Grep command is not working when put into cron

Hi, I worte a script which runs perfect when i execute it manually. But when i scheduled into cron the grep command alone is not working. the sample script, /usr/bin/grep FTP $subfile > /tmp/tfsrec.dat tfs=`echo $?` if then echo "FTP FOUND" else echo "FTP NOT FOUND" Where... (5 Replies)
Discussion started by: thiru_cs
5 Replies

9. HP-UX

where to put autorstart command?

hi everyone, I want to run some command automatically when the OS boot. In Linux, I found that we just put it into /etc/rc.local file; but I don't know where to put it in HP-UX system. please, help me........ thanks very much, :) (2 Replies)
Discussion started by: tataxin
2 Replies

10. UNIX for Advanced & Expert Users

hebrew font for ie5 in sun solaris

somebody know how to install Hebrew font for ie5 for sun solaris and from were (1 Reply)
Discussion started by: goldfelda
1 Replies
Login or Register to Ask a Question