Re: sftp: Umlauts and Spaces in filenames

2008-03-13 Thread Marcus Andree
From someone who speaks a native language with several
extended characters: even non-unix systems (has Windows
earned the system status already?) sucks with weird file
names.

snip


  That should work.. but, spaces and extended characters are so unclean in 
 the Unix world, it was never designed to use them.



sftp: Umlauts and Spaces in filenames

2008-03-12 Thread Marc Rene Arns
Hi,

I need to transfer files via sftp (ssh ftp) from a Windows machine.
This files may contain Umlauts (vd|) and Spaces.

I made several tests and stuck with the following:

sftp [EMAIL PROTECTED]:'/file-withv|d.txt'

works, but

sftp [EMAIL PROTECTED]:'/file with spaces.txt'

doesn't work.

If I use the interactive sftp shell its different:

sftp [EMAIL PROTECTED]
Connecting to windowsmachine.com
[EMAIL PROTECTED]'s password:
sftp get '/file with spaces.txt'

works, but I am unable to enter Umlauts in the interactive mode and when I
copy paste them they disappear.

I need to create a script and because of the spaces-problem I used expect.pm
to trigger the interactive mode. Is there a way to make it work with latin1
characters (using FreeBSD, but I guess that shouldn't matter). I can enter
Umlauts perfectly in the shell (bash here) and I've set
LANG=de_DE.ISO8859-15
export LANG

Am I missing something? Is there a chance to get this working?

Best Regards,
Benny



Re: sftp: Umlauts and Spaces in filenames

2008-03-12 Thread Marc Rene Arns
Apparently the Umlauts in my mail got mangled by majordomo, I meant german
latin1 characters, sometimes rewritten as 'ae' 'oe' and 'ue'.

benny
 Hi,

 I need to transfer files via sftp (ssh ftp) from a Windows machine.
 This files may contain Umlauts (vd|) and Spaces.

 I made several tests and stuck with the following:

 sftp [EMAIL PROTECTED]:'/file-withv|d.txt'

 works, but

 sftp [EMAIL PROTECTED]:'/file with spaces.txt'

 doesn't work.

 If I use the interactive sftp shell its different:

 sftp [EMAIL PROTECTED]
 Connecting to windowsmachine.com
 [EMAIL PROTECTED]'s password:
 sftp get '/file with spaces.txt'

 works, but I am unable to enter Umlauts in the interactive mode and when I
 copy paste them they disappear.

 I need to create a script and because of the spaces-problem I used
 expect.pm to trigger the interactive mode. Is there a way to make it work
 with latin1 characters (using FreeBSD, but I guess that shouldn't matter).
 I can enter Umlauts perfectly in the shell (bash here) and I've set
 LANG=de_DE.ISO8859-15
 export LANG

 Am I missing something? Is there a chance to get this working?

 Best Regards,
 Benny



Re: sftp: Umlauts and Spaces in filenames

2008-03-12 Thread Unix Fan
I ran a few tests, and OpenBSD seems perfectly capable of using those extended 
characters have you tried using doubled quotes?



sftp [EMAIL PROTECTED]:file with spaces and Umlauts.txt



That should work.. but, spaces and extended characters are so unclean in 
the Unix world, it was never designed to use them.







-Nix Fan.




Re: sftp: Umlauts and Spaces in filenames

2008-03-12 Thread Louis V. Lambrecht

Marc Rene Arns wrote:

Hi,

I need to transfer files via sftp (ssh ftp) from a Windows machine.
This files may contain Umlauts (vd|) and Spaces.

I made several tests and stuck with the following:

sftp [EMAIL PROTECTED]:'/file-withv|d.txt'

works, but

sftp [EMAIL PROTECTED]:'/file with spaces.txt'

doesn't work.

If I use the interactive sftp shell its different:

sftp [EMAIL PROTECTED]
Connecting to windowsmachine.com
[EMAIL PROTECTED]'s password:
sftp get '/file with spaces.txt'

works, but I am unable to enter Umlauts in the interactive mode and when I
copy paste them they disappear.

I need to create a script and because of the spaces-problem I used expect.pm
to trigger the interactive mode. Is there a way to make it work with latin1
characters (using FreeBSD, but I guess that shouldn't matter). I can enter
Umlauts perfectly in the shell (bash here) and I've set
LANG=de_DE.ISO8859-15
export LANG

Am I missing something? Is there a chance to get this working?

Best Regards,
Benny


  

It is up to the application to make necessary translations.
Formerly there was the DOS2Unix and such filters.
WinXP, Linux and to a certain extend FreeBSD, translate encodings with 
more or less success.


Since I see you use Perl,
have a look at
man utf8(3p)

Then, now part of the X distribution, there is the luit filter
man luit(1)

Not easy in an hybrid environment, for my part, I am blocked with tcl and
NFSv3 complaining about incompatible character sets.



Re: sftp: Umlauts and Spaces in filenames

2008-03-12 Thread Marc Rene Arns
So it must be an FreeBSD issue, sorry for the noise.
  I ran a few tests, and OpenBSD seems perfectly capable of using those
 extended characters have you tried using doubled quotes?
I tried *everything* (backslash, double quotes, single quotes,...)
BTW my ssh version is OpenSSH_4.5p1 FreeBSD-20061110 but I tried also 
openssh-portable-4.7.p1_1,1 from FreeBSD ports.


  sftp [EMAIL PROTECTED]:file with spaces and Umlauts.txt

  That should work.. but, spaces and extended characters are so unclean
 in the Unix world, it was never designed to use them.
Yes, but we are not in the 70's of the last century anymore ;-)





  -Nix Fan.