unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Nikita <grindeg@yandex.ru>
Cc: 36085@debbugs.gnu.org
Subject: bug#36085: 26.2; find-dired octal escapes instead of Cyrillic text
Date: Sat, 08 Jun 2019 15:20:18 +0300	[thread overview]
Message-ID: <83v9xgnu9p.fsf@gnu.org> (raw)
In-Reply-To: <02150b33-7105-f106-c8ea-afb4e7d04b67@yandex.ru> (message from Nikita on Tue, 4 Jun 2019 08:43:06 +0500)

> From: Nikita <grindeg@yandex.ru>
> 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.





  parent reply	other threads:[~2019-06-08 12:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-04  3:43 bug#36085: 26.2; find-dired octal escapes instead of Cyrillic text Nikita
2019-06-04 11:44 ` bug#36085: Screenshots for th bug Никита Никита
2019-06-08 12:20 ` Eli Zaretskii [this message]
2019-06-09 12:34   ` bug#36085: 26.2; find-dired octal escapes instead of Cyrillic text Tomas Nordin
2019-06-09 12:51     ` Eli Zaretskii
2019-06-08 15:14 ` Mattias Engdegård
2019-06-08 15:34   ` Eli Zaretskii
2019-06-09  5:22     ` Eli Zaretskii
2019-06-09  9:08       ` Mattias Engdegård
2019-06-09 10:57         ` Eli Zaretskii
2019-06-09 12:39           ` Mattias Engdegård
2019-06-09 12:49             ` Eli Zaretskii
2022-03-13  6:05     ` Visuwesh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83v9xgnu9p.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=36085@debbugs.gnu.org \
    --cc=grindeg@yandex.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).