Cyrillic locale

Advertisement

ks
Donor
Joined:
Posts:
89
Location:
Moscow

Cyrillic locale

Is WinWCP capable of parsing output of 'ls -la' on a system with Cyrillic locale? That's when the first line of ls output says not 'total n' but 'итого n' (same in Russian) plus the word is UTF encoded?

Reply with quote

Advertisement

Guest

Looks like something broken in "Clear national variables" option.
I try to connect to server with ru_RU.UTF-8 locale and can't see directory listing with error
"Unexpected directory listing line" where I can see, that timestamp of directory/files are in
national (cyrillic) letters. I try to reset locale in terminal window:

/usr/home/roman$ locale
LANG=ru_RU.UTF-8
LC_CTYPE="ru_RU.UTF-8"
LC_COLLATE="ru_RU.UTF-8"
LC_TIME="ru_RU.UTF-8"
LC_NUMERIC="ru_RU.UTF-8"
LC_MONETARY="ru_RU.UTF-8"
LC_MESSAGES="ru_RU.UTF-8"
LC_ALL=
/usr/home/roman$ setenv LANG en_US.UTF-8
/usr/home/roman$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_ALL=

After that I can see directory/files listing.

shell:
/usr/home/roman$ ps
PID TT STAT TIME COMMAND
73109 0 Ss+ 0:00,07 -csh (csh)

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, enable logging, log in to your server and do the operation and only the operation that causes the error. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

Advertisement

Guest

Hello, Martin. Thanks for looking at this issue.

There is session log.
  • 192.168.70.101.log (53.23 KB, Private file)
Description: session log

Reply with quote

Guest

Maybe this can help you understand problem:

roman@solution:~ % echo $PAGER
more
roman@solution:~ % unset PAGER
roman@solution:~ % echo $PAGER
more
roman@solution:~ % setenv PAGER
roman@solution:~ % echo $PAGER

roman@solution:~ %

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

Anonymous wrote:

Maybe this can help you understand problem:

roman@solution:~ % echo $PAGER
more
roman@solution:~ % unset PAGER
roman@solution:~ % echo $PAGER
more
roman@solution:~ % setenv PAGER
roman@solution:~ % echo $PAGER

roman@solution:~ %
Do you suggest that the unset does not work on your server?

Reply with quote

Guest

martin wrote:

Do you suggest that the unset does not work on your server?

https://man.openbsd.org/csh
Variable substitution
The shell maintains a list of variables, each of which has as value a
list of zero or more words. The values of shell variables can be dis-
played and changed with the set and unset commands. The system main-
tains its own list of ``environment'' variables. These can be dis-
played and changed with printenv, setenv and unsetenv.

As I understand, LANG variable can be operated via setenv/unsetenv command only.

Reply with quote

Advertisement

Guest

Maybe just add new "Shell" type ("csh" as example), which will be use unsetenv for "Clear national variables" procedure?

Reply with quote

Guest

martin wrote:

Well, actually you should use configure the bash for WinSCP sessions (if your default/preferred shell is not bash-compatible).
https://winscp.net/eng/docs/requirements#scp

The bash shell is recommended for working with WinSCP. If your default shell does not work with WinSCP, you can specify another shell. Typing the full path (e.g. /bin/bash or /usr/local/bin/bash) is recommended.

It develops that I can put any symbol as shell! So, "/bin/sh" works very well for me. Thanks for help, Martin!

Reply with quote

Advertisement

You can post new topics in this forum