bugfindutils - Bugs: bug #52890, `find --name` ignores files with...

 
 

bug #52890: `find --name` ignores files with non-printable character in the filename

Submitter:  None
Submitted:  Sun 14 Jan 2018 11:35:30 PM UTC
   
 
Category:  find Severity:  3 - Normal
Item Group:  Wrong result Status:  Working as Intended
Privacy:  Public Assigned to:  ericb
Originator Name:  H.-Dirk Schmitt Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  4.6.0
Fixed Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 15 Jan 2018 03:54:34 PM UTC, comment #3: 

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).

Eric Blake <ericb>
Group administrator
Sun 14 Jan 2018 11:55:52 PM UTC, comment #2: 

I give up :-(

asterisk ERR asterisk

Anonymous
Sun 14 Jan 2018 11:54:49 PM UTC, comment #1: 

Sorry markup has rotten the report  - it shoud be:
`find -name '*ERR*' '

Anonymous
Sun 14 Jan 2018 11:35:30 PM UTC, original submission:  

See also https://bugs.launchpad.net/ubuntu/+source/findutils/+bug/1742011

Affected:  4.6.0 in xenial, artful, bionic
bionic version is 4.6.0+git+20170828


Simple test case:
-----------------
```
touch $(echo -e ERR'\0303'OR )
touch NON_ERROR
find . -name "*ERR*"
```

Result is that only the file NON_ERROR is shown and the file with the non-printable character ERR?OR is missing.

`find .` (without -name) show both files.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jay (Updated the item)
  • -email is unavailable- added by ericb (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-09-01 jay StatusNone Working as Intended
        Assigned toNone ericb
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-cf05.
    Corresponding source code