Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 May 2018 09:10:00 +0800
From:      thor <thor@irk.ru>
To:        freebsd-questions@freebsd.org
Subject:   Cannot operate some UTF-8 named files in Midnight Commander
Message-ID:  <45313128-7d67-7717-9a20-6904170d2903@irk.ru>

next in thread | raw e-mail | index | archive | help
Hello!

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@betula:~% uname -a
FreeBSD betula 11.1-RELEASE FreeBSD 11.1-RELEASE #0: Thu Jan  4 18:12:07 
+08 2018 root@betula:/usr/src/sys/amd64/compile/CAVIA  amd64


thor@betula:~% setenv

...

LC_CTYPE=ru_RU.KOI8-R
...


Thor





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45313128-7d67-7717-9a20-6904170d2903>