Problem with sftp for accent character files


 
Thread Tools Search this Thread
Operating Systems HP-UX Problem with sftp for accent character files
# 1  
Old 06-29-2012
Problem with sftp for accent character files

Hi All,
Following are the problems i am facing.Resolution for these would be highly commendable:

a)I am trying to transfer files from my local C: directory to unix server using sftp.
The problem is coming when files with accent characters are picked for transfer.These files are not transferred.Error message of could not read/open file comes.
I am using putty to transfer the files.These files are dynamically generated through a C#.net application.

I also tried using psftp utility of putty.But that is also not able to read the file.
I had changed the character set to UTF - 8 and font to OEM mode but that did not help either.

b)I tried creating a dummy file on unix box through putty using touch command and renamed it with some accent characters.When i did ls to see the file the name of the file was changed to some other letters.Probably putty had encoded them.

My problem is if i try any tool that gets the file transferred then also on the unix box the name of the file is getting changed as it is getting encoded.Also the fiole is not opening.

Please help on this.How can i transfer the file so that the name and content of the file remains the same and easily readable.

Regards,
Krishan
# 2  
Old 06-29-2012
My suggestion would be to gzip or bzip (or any other compressing method which is also supported by the server to decompress) the file and then transfer. Compressing the file essentially encodes the problematic characters and there should not be any problem in sftp-ing it to the server.
# 3  
Old 06-29-2012
Compressing the file wouldn't fix the file name...

Theoretically, the filename is just a sequence of non-null and non-forward-slash characters. Whether or not the name looks pretty on the other end, it should still be representable; UNIX filenames are even more permissive than Windows ones, it shouldn't choke on anything a Windows filename has to offer. Unless perhaps they're extremely long?

Something may be attempting to translate the name to fit the remote system. I'd try disabling any translation if you can.

Also try winscp.
# 4  
Old 06-29-2012
What architecture and OS version are you using?
An HP traditionally uses roman8 char set. You would have to use ISO... (cant remember...) what language are you using to have accents? (I have SF (swiss-french))
# 5  
Old 06-30-2012
The file is getting dynamicaaly generated through a .net application.The name of the file is kept as per the entry made by the users from the interface.
These all files have french names and hence have the accent character.
I am on Windows XP OS as of now.
I tried using ssh and filezilla.Files are getting transferred and the same is shown on the tool interface but when i actually go to the server through putty the file names are different as they ae beogn encoded and als the file is not opening.
# 6  
Old 06-30-2012
I ment what is the server, an Itanium or Pa-Risc and what OS (11.11 11.23 11.31 etc...)

I am not sure you can transfer file with fancy char in the names, pure UNIX is standard ASCII (not extended...)
# 7  
Old 07-01-2012
Quote:
The file is getting dynamicaaly generated through a .net application.The name of the file is kept as per the entry made by the users from the interface.
These all files have french names and hence have the accent character.
Imho this is a system design error. By all means hold the user's reference to the file within the file, but don't let them decide filenames on your system. Apart from your current issues with cross-platform character sets, you lay yourself open to code injection.
If you want to maintain cross-platform compatibility, stick to alphanumeric filenames within the 7-bit ASCII character set. When Windows and FTP is involved, the MSDOS 8.3 format (not the contracted Windows version of 8.3 which includes a tilde character) is preferred.
i.e. Filenames like XXXXXXXX.XXX (i.e 8-dot-3).

Btew. UTF-8 makes the stuation worse because it uses more than one character to express one special character.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Accent words file from windows

Hi guys, I'm having a issue with a windows file from, at first the file is readed like one big and extense line and the famous "Ctrl+V Ctrl+R" or "^M return carriage"... fixed with: perl -pe 'if ( s/\r\n?/\n/g ) { $f=1 }; if ( $f || ! $m ) { s/()\z/$1\n/ }; $m=1' $file_input > file_output ... (5 Replies)
Discussion started by: jockx
5 Replies

2. Red Hat

Chroot sftp users, remote sftp login shows wrong timestamp on files

Hello, I have a weird issue, I have RHEL 5.7 running with openssh5.2 where sftpgroup OS group is chroot. I see the difference difference in timestamp on files, when I login via ssh and SFTP, I see four hour difference, is something missing in my configuration. #pwd... (8 Replies)
Discussion started by: bobby320
8 Replies

3. Shell Programming and Scripting

Problem with character by character reading

Hi friend, i have the following problem: when i am writting the below command on the command prompt , its working. while read -n 1 ch; do echo "$ch" ; echo "$ch" ; done<file_name.out. but when i am executing it after saving it in a ksh file, its not working. Please helppppppppp .. thankss... (18 Replies)
Discussion started by: neelmani
18 Replies

4. Shell Programming and Scripting

sftp script - problem removing files remotely

Hello all, After searching through the similar topics and not finding a working solution, I decided to join and post my question (and maybe kill time and help other users). Essentially I am trying to get a file from the sftp and then delete it after the file is pulled. all the sftp commands... (3 Replies)
Discussion started by: MarcMaiden
3 Replies

5. Shell Programming and Scripting

Remove spanish accent from file name

Hello All hope all fine, I have a question about spanish accents... I have in a redhat server, a lot of files with Ñ or Ú accent into the NAME of the file. So my question is: Is it possible to change this name but with a script...to change all the occurence in one shot. Exemple: cd... (2 Replies)
Discussion started by: ldiaz2106
2 Replies

6. Shell Programming and Scripting

Shell script to Open file in SFTP and get first 6 character

Hi, I am creating a script that will: 1. Connect to SFTP server 2. Get the file content's first 6 character (ddmmyy) and compare it to today's date (also in ddmmyy format). This is the header of the file. However, the header contains a few more information. So i need to only get the first 6... (0 Replies)
Discussion started by: cherriesh
0 Replies

7. Shell Programming and Scripting

Spanish accent symbol removed by sed

Hello All in a text file I have to replace some numeric code by a string. This is an exemple of the file: 000000001 LDR L ^^^^^nam^^2200169Ia^45e0 000000001 008 L 100604s9999^^^^xx^^^^^^^^^^^^000^0^und^d 000000001 022 L $$a0365-6675 000000001 090 L $$aBMA 1934-1937. 000000001 245... (1 Reply)
Discussion started by: ldiaz2106
1 Replies

8. Shell Programming and Scripting

Breaking a file into three new files, character by character

I am new to shell scripting, and need a script to randomly distribute each character from a file into one of three new files. I also need each character to maintain it's position from the original file in the new file (such that if a character is written to File 1, Files 2 and 3 have spaces... (10 Replies)
Discussion started by: foxcastle
10 Replies

9. Shell Programming and Scripting

Sed accent

Hi everyone ! I'd like to write a unix command for correcting all european accent errors in a document (spanish, german, french, danisch, etc )! i need to do this for correcting my document : sed -e 's/%2B/\ /g' -e 's/%25C9/É/g' doc1 > doc2 The first command is ok and change "%2B" into... (3 Replies)
Discussion started by: Tomat75
3 Replies

10. UNIX for Dummies Questions & Answers

accent in emacs

Hello, I try to insert charcheters with accent with emacs. It doesn't work. How can I do ? Thank you in advance (2 Replies)
Discussion started by: annemar
2 Replies
Login or Register to Ask a Question