Problem with LANG setting

Advertisement

meyergru
Joined:
Posts:
1

Problem with LANG setting

I always get a directory listing error:

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:

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:

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

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,506
Location:
Prague, Czechia

Re: Problem with LANG setting

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.

Reply with quote

Guest

Re: Problem with LANG setting (SOLVED)

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!

Reply with quote

Advertisement

You can post new topics in this forum