Topic "Problem with LANG setting"

Author Message
meyergru
[View user's profile]

Joined: 2009-11-25
Posts: 1
I always get a directory listing error:

Code:

Unexpected directory listing line 'insgesamt 234'.
Invalid rights description 'nsgesamt '


My Linux account uses LANG="de_DE.UTF-8" and a shell setting of /bin/tcsh.

Because of this, a directory listing starts like this:

Code:

Listing current directory.
ls -la --full-time ; echo "WinSCP: this is end-of-file:$status"
insgesamt 234
drwxr-xr-x  33 root   root     4096 2009-11-25 15:26:38.000000000 +0100 .
drwxr-xr-x  33 root   root     4096 2009-11-25 15:26:38.000000000 +0100 ..


The problem seems to be the first line reading "insgesamt 234" instead of the usual "total 234".

WinSCP tries to avoid other languages by doing this:

Code:

Clearing national user variables.
unset "LANG" ; echo "WinSCP: this is end-of-file:$status"
WinSCP: this is end-of-file:0
unset "LANGUAGE" ; echo "WinSCP: this is end-of-file:$status"
WinSCP: this is end-of-file:0


However, with tcsh or csh being the standard shell, a simple "unset LANG" does not do the trick. One has to use "unsetenv LANG" instead.

Another solution would be to simply ignore the first word on the first line if the line contains exactly two words. I assume the relevant info is the number of files. And guessing from the error message, it is not even needed anyway. Otherwise, the first line could not be mistaken for a directory entry.

For now, I have to resort to changing the language setting for my user - or is there anything else I could do to make it work?


Regards
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
meyergru wrote:
For now, I have to resort to changing the language setting for my user - or is there anything else I could do to make it work?

Please read documentation. If that does not help, come back.
_________________
Martin Prikryl
Guest




prikryl wrote:
meyergru wrote:
For now, I have to resort to changing the language setting for my user - or is there anything else I could do to make it work?

Please read documentation. If that does not help, come back.


O.K., got it, although the solution was not that obvious:

1. The options for directory listing are greyed out by default - they are only used for SCP and not for SFTP.

2. There is no option to make "ls" ignore the language setting anyway.

3. Solution in my case was to use force /bin/bash as shell so that the unsetting of LANG variables works again.


Thanks!
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License