Generate and copy files in UNICODE format from Linux to Windows


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Generate and copy files in UNICODE format from Linux to Windows
# 8  
Old 01-02-2012
i have not specified the mode explicitly....what is the default mode?
# 9  
Old 01-02-2012
After converting i.e. unix2dos, did you try ftp-ing the file to windows and opening it?

--ahamed
# 10  
Old 01-02-2012
yes ahamed...i have s-ftp-ed the file after converting it using unix2dos...but the files is in ASCII mode while opening in windows server....
# 11  
Old 01-06-2012
Hi,
Any pointers on how to spool files in unicode format using shell script?
# 12  
Old 01-06-2012
so assuming you want to spool the files from a SQL DB in unicode, (disclaimer:am no sql expert, found this on the interweb, so YMMV). Try this. Set this in your shell and try spooling the files. Also ensure the locale settings in your shell are set to en_US.UTF-8

Code:
export NLS_LANG=AMERICAS_AMERICA.AL32UTF8


Last edited by dude2cool; 01-06-2012 at 10:19 AM..
# 13  
Old 01-06-2012
Assuming you mean UTF-8 (not UTF-16) basic ASCII is the same as UTF-8. However if you have any special characters (like accented foreign characters) in your data they would be represented in two or more bytes in UTF-8.

A text file FTP will remove the high order bits from ASCII special characters. If you file contains special characters it will require conversion on the unix server followed by binary mode FTP.

My advice would be to get the database extract program to write the file in the correct format rather than mess about trying to fix it with Shell.

Some Linux servers store all text data in Unicode format. You don't mention what specific Operating System you have.
# 14  
Old 01-09-2012
Hi,
Thanks for the reply.
We are using sftp to transfer the files, hence it will be binary mode transfer.
Below is the OS details on which this script runs.
Linux ip-10-49-29-179 2.6.18-194.0.0.0.3.el5xen #1 SMP Mon Mar 29 18:27:00 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Modified or latest files copy from windows to Linux

To copy the file from windows to linux i use pscp command(pscp source user@destination). Know i want to copy the latest modified or created files from windows to linux. could any one please help me out with it. Thanks and Regards, Sourabh (2 Replies)
Discussion started by: SourabhChavan
2 Replies

2. Solaris

Need to copy files to Windows from Solaris - sun os 5.6

Hi All, I am supposed to copy files from Solaris to windows on Daily Basis. Have tried using with scp and have error "connection refused" The version is sun os - 5.6 Have checked using ps -ef | grep sshd to find whether the ssh service is running. and i dont find any service... (3 Replies)
Discussion started by: vijaymec50
3 Replies

3. UNIX for Dummies Questions & Answers

Copy files from Linux server local windows machine using a shell script

Hello, I need to create a shell script which will copy files - which are created on particular date and starting with particular name - to local windows XP machine. Is this possible.? Currently it is being done manually using winscp (1 Reply)
Discussion started by: NarayanaPrakash
1 Replies

4. Shell Programming and Scripting

Copy files from Linux server to Windows server

Hi All, I am generating report in a Linux server and once the report is generated the report(.txt file) needs to be automatically saved in a Windows servers. So i am looking for a script to transfer the file automatically from Linux server to Windows server? Please advise. Thanks... (3 Replies)
Discussion started by: arunmanas
3 Replies

5. UNIX for Dummies Questions & Answers

Copy everything from remote Linux to external hard drive in windows

Hi, I`m trying to copy an entire directory(with numerous files, folders and subfolders etc, a content size of 500gigs) from a linux machine running Red Hat Enterprise Linux 6 to an external hard drive on my windows. I downloaded and installed psftp on my windows and I can login using psftp... (9 Replies)
Discussion started by: newbie83
9 Replies

6. Shell Programming and Scripting

copy files from linux to windows

is there any way to copy files from linux to windoes with out mounting ideally using a script in linux or windows which ever possible (4 Replies)
Discussion started by: robo
4 Replies

7. Shell Programming and Scripting

Unix shell script to Copy files from one Windows server to another Windows server.

Can anybody please help me on how to code for the below requirement: I need to write a shell script (on different unix server) to copy files from multiple folders (ex. BRN-000001) from one windows server (\\boldls-mwe-dev4)to a different windows server(\\rrwin-ewhd04.ecomad.int). This shell... (4 Replies)
Discussion started by: SravsJaya
4 Replies

8. Shell Programming and Scripting

shell script to copy files frm a linux machine to a windows machine using SCP

I need a shell script to copy files frm a linux machine to a windows machine using SCP. The files keeps changing day-to-day. I have to copy the latest file to the windows machine frm the linux machine. for example :In Linux, On July 20, the file name will be 20.txt and it should be copied to... (3 Replies)
Discussion started by: nithin6034
3 Replies

9. UNIX for Dummies Questions & Answers

Copy directory from Linux to Windows

Hola a todos, soy realmente nuevo programando en bash, y aśn estoy encontrando bastantes baches :o, mi pregunta es simple, supongo, alguien podria decirme si existe una manera facil de copiar un directorio de un server a otro?, sucede que en un server(server1) tengo los backup de las bases de... (7 Replies)
Discussion started by: yeestrada
7 Replies

10. UNIX for Advanced & Expert Users

how can i copy data in LINUX Machine to windows XP

Can anyone tell me how can i copy data in LINUX Machine to windows XP Thanks, Sandeep (2 Replies)
Discussion started by: bsandeep_80
2 Replies
Login or Register to Ask a Question