Copying a file with UTF char on UNIX server


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Copying a file with UTF char on UNIX server
# 8  
Old 04-14-2015
Quote:
Originally Posted by varun22486
Hi, I am using a solaris machine.

I am using a terminal (Putty)

set fileencoding is not a valid options.

Please help I really need to get this going
Hi,
what is your "Controlling character set translation" settting on the Putty for received data from server (you)?

(putty->window->translation )

is it UTF-8 or ? (must UTF-8)


regards,
ygemici
# 9  
Old 04-14-2015
Please show us the (sensibly abbreviated) output of od -ctx1 on both the original and the copied file.
# 10  
Old 04-14-2015
Ok, I changed my setting in putty->window->translation and it worked. As soon as i did sudo to application user it again stops working so something is getting change.. not sure how to get it working over there as well.
# 11  
Old 04-16-2015
Also when i cat the file i see the UTF chars but when I do a vi..I just see numbers not the actual UTF CHars.



Any help will be appreciated.

---------- Post updated at 10:28 AM ---------- Previous update was at 10:28 AM ----------

Quote:
Originally Posted by ygemici
Also when i cat the file i see the UTF chars but when I do a vi..I just see numbers not the actual UTF CHars.



Any help will be appreciated.
# 12  
Old 04-16-2015
If you don't receive an answer immediately, WAIT! We are not "on call".

What is the LOCALE variable set to in your home environment, and in the application user?

It's possible the version of vi you have doesn't support UTF-8.
# 13  
Old 04-20-2015
Quote:
Originally Posted by varun22486
Ok, I changed my setting in putty->window->translation and it worked. As soon as i did sudo to application user it again stops working so something is getting change.. not sure how to get it working over there as well.
you must save the putty session.

---------- Post updated at 10:25 PM ---------- Previous update was at 09:27 PM ----------

Quote:
Originally Posted by varun22486
Also when i cat the file i see the UTF chars but when I do a vi..I just see numbers not the actual UTF CHars.

Any help will be appreciated.

Corona688 has been said already , probably your vi does not support it.
tyr different editors. (for ex -> vedit)

if you want force to vi working then maybe ,

1- ) Putty Translation Settings (Utf-8)
2 -) Solaris has UTF-8 for locale
what did you charmaps ?
locale -m

now you can see the UTF-8.. if is not in there then you execute
Code:
/usr/bin/uncompress /usr/lib/localedef/src/en_US.UTF-8/charmap.src.Z
/usr/bin/uncompress /usr/lib/localedef/src/en_US.UTF-8/localedef.src.Z

than try-again
Code:
locale -m
...
iso_8859_1/charmap.src
en_US.UTF-8/charmap.src
...

3 -) export LC_CTYPE="en_US.UTF-8"
(if `locale -m` output doesnt get the UTF-8 , you dont the set this locale already )

4- ) then try in the vi

regards,
ygemici
# 14  
Old 04-23-2015
working with URF on SQLPLUS

I have below SQL that I wasnt to run from a solaris machine using sqlplus

select * from TABLE_NAME where regexp_like(field_value, 'Α|Β|Γ|Δ|Ε|Ζ|Η|Θ|Ι|Κ|Λ|Μ|Ν|Ξ|Ο|Π|Ρ|Σ|Τ|Υ|Φ|Χ|Ψ|Ω|α|β|γ|δ|ε|ζ|η|θ|ι|κ|λ|μ|ν|ξ|ο|π|ρ|σ|τ|υ|φ|χ|ψ|ω' );

When I cat the file UTF char shows perfect however when i run the script from sqlplus it returns nothing. If you run it from sqldevloper it actually has these UTF char which should return rows.

Can someone help on what do I need to in order to get it working from sqlplus?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Working with UTF char sqlplus

I have below SQL that I wasnt to run from a solaris machine using sqlplus select * from TABLE_NAME where regexp_like(field_value, 'Α|Β|Γ|Δ|Ε|Ζ|Η|Θ|Ι|Κ|Λ|Μ|Ν|Ξ|Ο|Π|Ρ|Σ|Τ|Υ|Φ|Χ|Ψ|Ω|α|β|γ|δ|ε|ζ|η|θ|ι|κ|λ|μ|ν|ξ|ο|π|ρ|σ|τ|υ|φ|χ|ψ|ω'); When I cat the file UTF char shows perfect however when i run... (1 Reply)
Discussion started by: varun22486
1 Replies

2. Shell Programming and Scripting

Copying the files to Windows server from UNIX server

Hi Team, I had a requirement to write a shell script which automatically transfer the files from unix server to windows server. I can able to unix to unix using Scp command. I am not sure how to do unix to windows. I am very new on this concept. Could you please help me or guide in... (4 Replies)
Discussion started by: gvkumar25
4 Replies

3. Linux

Help to Convert file from UNIX UTF-8 to Windows UTF-16

Hi, I have tried to convert a UTF-8 file to windows UTF-16 format file as below from unix machine unix2dos < testing.txt | iconv -f UTF-8 -t UTF-16 > out.txt and i am getting some chinese characters as below which l opened the converted file on windows machine. LANG=en_US.UTF-8... (3 Replies)
Discussion started by: phanidhar6039
3 Replies

4. UNIX for Dummies Questions & Answers

Copying files from Unix Server to Local

How to copy files from Unix server to Local (6 Replies)
Discussion started by: win4luv
6 Replies

5. UNIX for Dummies Questions & Answers

Copying files from Unix Server to Local

How do i copy files from Unix Server to my Local Desktop.. ANy ideas..please suggest....V Urgent. (1 Reply)
Discussion started by: win4luv
1 Replies

6. Shell Programming and Scripting

Error copying files from Unix (Solaris10) to Windows Server 2003 using scp/sftp

Hi, I have generated a Public/Private Key Pair in Solaris Unix (source) server and deployed the Public key in Windows 2003(target) server .ssh directory of user profile. When i try to connect(ssh, scp, sftp) from Unix, i'm getting below error message. Sun_SSH_1.1, SSH protocols 1.5/2.0,... (0 Replies)
Discussion started by: ajaykumarb
0 Replies

7. UNIX for Dummies Questions & Answers

Copying dir (and sub dir) file names from ftp server to txt file in diff server

Hey all, i want to copy only the file names from an ftp server (directory and all sub directory) to a text file in another server (non ftp), i.e. i want to recursively move through directories and copy only the names to a text file. any help is appreciated...thank you in advance (1 Reply)
Discussion started by: deking
1 Replies

8. Shell Programming and Scripting

writing script in UNIX for copying files in two server

can anyone help me in writing script in UNIX for copying files in two server from the third server after checking the files in the third server and if there is anything new in the third server automatically it should be added to the rest of the two servers and if same file is existing in the two... (4 Replies)
Discussion started by: REKHA09
4 Replies

9. UNIX for Dummies Questions & Answers

copying directories from NT server to Unix server (solaris 5.8)

I need to copy around 30 directories (each directory include one or more text file(s)) from NT server to Unix server at one go. For doing this what are the privillages i should have in both NT and Unix server. Please let me know which command i can use in shell prompt. TIA. (4 Replies)
Discussion started by: jhmr7
4 Replies

10. UNIX for Advanced & Expert Users

Copying files between 2 Unix server

Is there a simple way to copy data from one server to a different server? Seems that if 2 servers are on the same network, there should be a simple way to copy between the two. Not just one file. I need to copy a whole directory with subdirectories from one server to a different one. I... (9 Replies)
Discussion started by: Docboyeee
9 Replies
Login or Register to Ask a Question