Bug 293659 - dictionary files in /usr/share/dict are not sorted
Summary: dictionary files in /usr/share/dict are not sorted
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 16.0-CURRENT
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-03-08 03:46 UTC by Jerry Williams
Modified: 2026-03-11 16:47 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jerry Williams 2026-03-08 03:46:30 UTC
The dictionary files in /usr/share/dict are not sorted.

I don't know if anything in base is actually using these, but I would expect these files to be sorted. The port bsd-spell recommends
     All word (and stop) lists must be sorted in lexicographical order with
     case folded.  The simplest way to achieve this is to use “sort -df”.  If
     the word files are incorrectly sorted, bspell will not be able to operate
     correctly.


Ex:
export LC_ALL=C.UTF-8; i=/usr/share/dict/words; sort -df $i >a; diff $i a
31894d31893
< caulk
31916a31916
> caulk
78898d78897
< gooey
78928a78928
> gooey
99811d99810
< Jean-Pierre
99817a99817
> Jean-Pierre
Comment 1 commit-hook freebsd_committer freebsd_triage 2026-03-09 19:41:28 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=72f0bc868bf00586cba1e50057d8f1998b4abe80

commit 72f0bc868bf00586cba1e50057d8f1998b4abe80
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2026-03-09 19:35:53 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2026-03-09 19:40:31 +0000

    share/dict/web2: Sort

    PR: 293659
    Fixes: e49b6ead4114 ("Add a number of five letter words to the dictionary")

 share/dict/web2 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Comment 2 Jerry Williams 2026-03-09 20:37:50 UTC
https://cgit.freebsd.org/src/commit/?id=72f0bc868bf00586cba1e50057d8f1998b4abe80

This fixes web2, but freebsd and web2a are also unsorted.
Comment 3 commit-hook freebsd_committer freebsd_triage 2026-03-11 16:47:26 UTC
A commit in branch stable/15 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=945099520368481f1f5d6fd76028db7802a96d13

commit 945099520368481f1f5d6fd76028db7802a96d13
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2026-03-09 19:35:53 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2026-03-11 16:46:55 +0000

    share/dict/web2: Sort

    PR: 293659
    Fixes: e49b6ead4114 ("Add a number of five letter words to the dictionary")
    (cherry picked from commit 72f0bc868bf00586cba1e50057d8f1998b4abe80)

 share/dict/web2 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)