From owner-freebsd-questions@freebsd.org Tue May 8 01:10:27 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BBFCCFC407E for ; Tue, 8 May 2018 01:10:27 +0000 (UTC) (envelope-from thor@irk.ru) Received: from mail.irk.ru (mail.irk.ru [195.206.40.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 37C7487610 for ; Tue, 8 May 2018 01:10:26 +0000 (UTC) (envelope-from thor@irk.ru) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=irk.ru; s=dkim; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Date:Message-ID :Subject:From:To:Sender:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=p4p2HMyhTiEs3CGS2V3W7WGm4QVtGbYA6OzIeXMkz/c=; b=RoPeacj8mbYylups4YmQYBLQps 8sm2ILgCYNJF8tQchD+zgwFiU5oZdny/87kVfhcTVA/Taf7fEiCave8DA5HJrUio0djF2Fz1ugXEz 0Fpi85jtbJp4/ZIPhn+xIlf1ERkISAyNRMjG2YNic/xNpXr9CknJM53JaxLZ45KLI2Ck=; Received: from [194.176.114.54] (helo=[192.168.1.130]) by mail.irk.ru with esmtpa (Exim 4.89 (FreeBSD)) (envelope-from ) id 1fFr2p-00097V-3V for freebsd-questions@freebsd.org; Tue, 08 May 2018 09:03:55 +0800 To: freebsd-questions@freebsd.org From: thor Subject: Cannot operate some UTF-8 named files in Midnight Commander Message-ID: <45313128-7d67-7717-9a20-6904170d2903@irk.ru> Date: Tue, 8 May 2018 09:10:00 +0800 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 May 2018 01:10:27 -0000 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