Problem with LANG setting
I always get a directory listing error:
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:
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:
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
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