-
-
Notifications
You must be signed in to change notification settings - Fork 42
Description
Is there an existing issue for this?
- I have searched the existing issues
Midnight Commander version and build configuration
4.8.33, gitOperating system
anyIs this issue reproducible using the latest version of Midnight Commander?
- I confirm the issue is still reproducible with the latest version of Midnight Commander
How to reproduce
As pointed out at #4480 (comment) and #4804 (comment) (also the next comment), tcsh's strings aren't binary safe. It wants to ensure that all variables and whatnot are valid according to the current locale (which is almost certainly UTF-8).
This causes problems in two directions:
If, with mc's panels on, you navigate to a directory whose name isn't valid UTF-8, the tcsh subshell (as we inject a cd command to it) might not be able to enter it.
If, with mc's panels off, you navigate in the tcsh subshell to a directory whose name is invalid UTF-8 (using e.g. wildcard or tab completion), it might report back this directory (using the echo $cwd:q command) in a wrong encoding, so when mc's panels are turned on, it fails to switch to that directory.
Let's try to find a binary safe solution for both of these.
Expected behavior
.
Actual behavior
.
Additional context
No response