From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#36085: 26.2; find-dired octal escapes instead of Cyrillic text Date: Sat, 08 Jun 2019 15:20:18 +0300 Message-ID: <83v9xgnu9p.fsf@gnu.org> References: <02150b33-7105-f106-c8ea-afb4e7d04b67@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="123315"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 36085@debbugs.gnu.org To: Nikita Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 08 14:21:23 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hZaLa-000VyX-A2 for geb-bug-gnu-emacs@m.gmane.org; Sat, 08 Jun 2019 14:21:22 +0200 Original-Received: from localhost ([::1]:58248 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZaLY-0000gA-Sp for geb-bug-gnu-emacs@m.gmane.org; Sat, 08 Jun 2019 08:21:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45344) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZaLN-0000g2-PL for bug-gnu-emacs@gnu.org; Sat, 08 Jun 2019 08:21:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hZaLK-0007cW-8f for bug-gnu-emacs@gnu.org; Sat, 08 Jun 2019 08:21:08 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39416) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hZaLG-0007Xy-8A for bug-gnu-emacs@gnu.org; Sat, 08 Jun 2019 08:21:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hZaLG-0005VE-16 for bug-gnu-emacs@gnu.org; Sat, 08 Jun 2019 08:21:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 08 Jun 2019 12:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36085 X-GNU-PR-Package: emacs Original-Received: via spool by 36085-submit@debbugs.gnu.org id=B36085.155999643621104 (code B ref 36085); Sat, 08 Jun 2019 12:21:01 +0000 Original-Received: (at 36085) by debbugs.gnu.org; 8 Jun 2019 12:20:36 +0000 Original-Received: from localhost ([127.0.0.1]:52960 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hZaKq-0005UK-Ic for submit@debbugs.gnu.org; Sat, 08 Jun 2019 08:20:36 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:36531) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hZaKo-0005U6-92 for 36085@debbugs.gnu.org; Sat, 08 Jun 2019 08:20:34 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:40600) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hZaKh-0006u1-Qs; Sat, 08 Jun 2019 08:20:28 -0400 Original-Received: from [176.228.60.248] (port=1113 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hZaKh-0005cG-A0; Sat, 08 Jun 2019 08:20:27 -0400 In-reply-to: <02150b33-7105-f106-c8ea-afb4e7d04b67@yandex.ru> (message from Nikita on Tue, 4 Jun 2019 08:43:06 +0500) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:160236 Archived-At: > From: Nikita > Date: Tue, 4 Jun 2019 08:43:06 +0500 > > When i open dired, go to the needed directory, run "M-x dired-find" > "-name "*Портрет*" (or anything at all that will give some results) > results come back with octal escapes instead of Cyrillic letters. > I cannot open pictures that it finds for example. Turns out the octal escapes are produced by 'find' itself in this case. Try the following command in that directory from the shell prompt: find . \( -iname "*Портрет*" \) -ls and you will see the same octal escape instead of the Cyrillic characters. The man page for 'find' clearly documents this, under "Unusual Filenames": Unusual characters are handled differently by various actions, as described below. [...] -ls, -fls Unusual characters are always escaped. White space, backslash, and double quote characters are printed using C-style escaping (for example `\f', `\"'). Other unusual characters are printed using an octal escape. Other printable characters (for -ls and -fls these are the characters between octal 041 and 0176) are printed as-is. What this means is that any non-ASCII character will be converted to a series of octal escapes. IMO, this is a terrible misfeature in GNU Findutils, as such "handling" of non-ASCII characters has no place in today's global environment. I suggest to report this bug to the GNU Findutils developers. Thanks. P.S. Emacs could perhaps go above and beyond the call of duty, and attempt to convert the octal escapes back to readable text. But I don't think we should do it, as it's a clear bug in 'find'. Nonetheless, if someone wants to submit patches to do such a conversion, I won't block them.