bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #52890] `find --name` ignores files with non-printable character in


From: Eric Blake
Subject: [bug #52890] `find --name` ignores files with non-printable character in the filename
Date: Mon, 15 Jan 2018 10:54:34 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0

Follow-up Comment #3, bug #52890 (project findutils):

You've discovered a fundamental flaw in the specification of the glob()
function - it is only required to have well-defined behavior on byte strings
that are valid encodings in the current locale.  There is no portable way to
make glob patterns match file names that contain encoding errors in a
multibyte locale.  But what you CAN do is specify 'LC_ALL=C find' for any
situation where you want to ensure that globs cannot fail due to encoding
errors, because the C locale is guaranteed by POSIX to be a single-byte
8-bit-clean locale (thus, no encoding errors are possible in that locale, and
glob() no longer has to worry about failure to match a byte string that is not
a valid character string).


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?52890>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]