bugfindutils - Bugs: bug #46846, failure due to filename encoding...

 
 

bug #46846: failure due to filename encoding and locale on OSX

Submitter:  Clarence Risher <sparr>
Submitted:  Thu 07 Jan 2016 10:22:30 PM UTC
   
 
Category:  updatedb Severity:  3 - Normal
Item Group:  Wrong result Status:  Fixed
Privacy:  Public Assigned to:  jay
Originator Name:  Open/Closed:  Closed
Release:  4.4.2 Fixed Release:  4.7.0
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 01 Sep 2019 07:52:50 AM UTC, comment #3: 

This should be fixed in findutils 4.7.0.   From the NEWS file:

The updatedb script now operates in the C locale only.  This means
that character encoding issues are now not likely to cause sort to
fail.  It also honours the TMPDIR environment variable if that was
set, and no longer sorts file names case-insensitively.


James Youngman <jay>
Group administrator
Sat 09 Jan 2016 04:00:40 PM UTC, comment #2: 

Having read the bug report you pointed to, I'll be a bit more explicit: yes, I confirm that this is a bug in the updatedb script.  The fix you suggest is appropriate.

James Youngman <jay>
Group administrator
Sat 09 Jan 2016 03:58:50 PM UTC, comment #1: 

Your workaround seems like a good idea to me.  Thanks.  File path names are not actually text, anyway (since there is no mechanism to enforce any constraint that the basename of a subdirectory has the same character encoding as the basename of its parent).

FWIW, the current stable release is 4.6.0 (though it is likely affected by the same problem you're reporting).

James Youngman <jay>
Group administrator
Thu 07 Jan 2016 10:22:30 PM UTC, original submission:  

I've installed updatedb via Homebrew and encountered this problem:

$ sudo updatedb
/usr/bin/sort: string comparison failed: Illegal byte sequence
/usr/bin/sort: Set LC_ALL='C' to work around the problem.
/usr/bin/sort: The strings compared were `/LIBRARY/FONTS/ō\216Ɩ\207ǻ\206ɻ\221.TTF' and `/LIBRARY/FONTS/ō\216Ɩ\207ɻ\221Ľ\223.TTF'.

here are some possibly valid environment settings:

$ locale
LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL=
$ env | egrep '^(LANG=|LC_)' | sort
LANG=en_US.UTF-8

downstream report: https://github.com/Homebrew/homebrew/issues/47791

my temporary workaround is to just `export LC_ALL="C"` at the top of the updatedb script

Clarence Risher <sparr>

 

(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 (Posted a comment)
  • -email is unavailable- added by sparr (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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-09-01 jay StatusNone Fixed
        Open/ClosedOpen Closed
        Fixed ReleaseNone 4.7.0
    2016-01-09 jay Item GroupNone Wrong result
        Assigned toNone jay

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code