Cannot operate some UTF-8 named files in Midnight Commander
thor at irk.ru
Tue May 8 01:10:27 UTC 2018
Being Russian, I have almost always used KOI-8R for 20 years now. But
there are 2 problem that push me to migrate to UTF-8:
1) There is a problem with Kernel Mode Switch in some video cards, which
still is not solved and requires me to either use VESA or NVidia,
2) There are lots of files in my torrent collection, and torrents use UTF-8.
When I see the torrent collection in Midnight Commander in KOI-8 (No
translation) there is lots of files with nonreadable names consisting of
some Russian letters and pseudo-graphics and I can perform file
operations on these files (copy, view etc).
When I choose Menu - Right (or Left) - Encoding - UTF-8 the file name
becomes readable. But then some of files and directories (not all)
become: status (left column) = '?', size = 0, date = "Jan 1 1970" and
no operations can be performed with these files and directories.
Theoretically, I could copy the file somewhere and then rename it to
Latin letters. But it's annoying and it also impossible to rename the
files in active torrent collection.
As I understand the valid file name is any string of non-NUL bytes
ending with NUL while "/" is directory separator and any part between
slashes is not more than 255 bytes long, and there is no such limitation
as requirement that the file name is to be correctly coded in any
existing codepage including UTF-8.
Is there a method to operate in Midnight Commander any and all files
while the encoding is set to UTF-8?
Midnight Commander 4.8.19
thor at betula:~% uname -a
FreeBSD betula 11.1-RELEASE FreeBSD 11.1-RELEASE #0: Thu Jan 4 18:12:07
+08 2018 root at betula:/usr/src/sys/amd64/compile/CAVIA amd64
thor at betula:~% setenv
More information about the freebsd-questions