On 2024-01-20 08:44 +0100, Sven Joachim wrote: > On 2024-01-20 00:20 +0100, ju...@op.pl wrote: > >> I'm not sure if this is actually a bug in the mc package or maybe >> somewhere in sshd or in some library that uses ssh. That's why I >> didn't report it via reportbug. Anyway, I noticed the effects only in >> Shell Link in mc. SSH in the terminal works fine. FTP Link in mc also >> works properly. >> The bug appeared today and is visible on all computers connecting to >> remote Debian Testing systems regardless of MC version (I tested it >> with mc from Ubuntu 18 and from the current Mint). File and directory >> names on the remote Debian Testing computer containing UTF-8 Non-ASCII >> characters are displayed incorrectly and the files and directories >> cannot be read. >> For example, instead of a file with a name containing the Polish >> letters "AąCćEę", Shell Link mc sees a file named >> "A304205C304207E304231". > > Interesting. I can reproduce that, it has apparently been triggered by > the Perl upgrade from 5.36 to 5.38. > >> Can anyone advise me which package this error should be reported for? > > The mc package. You can tag the bug as forwarded to > https://midnight-commander.org/ticket/4507, which has already been > closed. The fix will be part of mc 4.8.31, if you are lucky the Debian > maintainers cherry-pick it earlier.
I have attached the patch which fixes the bug. You can apply it directly to /usr/lib/mc/fish/ls, if you do not mind that tools like debsums and "dpkg --verify" might complain about the changed file. Cheers, Sven
diff --git a/src/vfs/shell/helpers/ls b/src/vfs/shell/helpers/ls index 4c8ca21137..c7701d644f 100644 --- a/src/vfs/shell/helpers/ls +++ b/src/vfs/shell/helpers/ls @@ -122,9 +122,8 @@ SHELL_DIR=$1 perl -e ' use strict; use POSIX; -use Fcntl; -use POSIX ":fcntl_h"; #S_ISLNK was here until 5.6 -import Fcntl ":mode" unless defined &S_ISLNK; #and is now here +use Fcntl ":mode"; # S_ISLNK, S_IFMT, S_IMODE are here +use POSIX ":fcntl_h"; # S_ISLNK might be here as well my $dirname = $ARGV[0]; if (opendir (DIR, $dirname)) { while((my $filename = readdir (DIR))){