Disclaimer: I am aware this is advanced stuff, "off the beaten track, and could blow up my system, cause a rain of frogs, or have unknowable strange unpredictable side effects. That said..... assistance anyway please :) I promise I won't hold anyone responsible :)
Simple version, I want to modify my FreeBSD server's charset sort order so that underscore is ranked systemwide before letters and numbers in alphabetic order, not between upper/lowercase (underscore falls between 'XYZ' and 'abc' in ASCII/Unicode).
The reason is that for about 20 years I've put all the files and dirs. that are "important" with varying numbers of underscores at the start, to force them to the top of the list in Windows and its predecessors (which sort symbols -> numbers -> letters at least as far as non-Unicode goes). On that background it's immensely disconcerting to have now at the bottom. Disconcerting enough that I'd like to change my FreeBSD server's charset sort order the tiniest bit, just to get underscore before alphanumeric not after it.
I can't think that anything critical would be predicated on this in the system or common software (especially as other languages have different sort orders), and I don't need to change any other character orderings.
I've got as far as
colldef, and from
man colldef and a skim through FreeBSD source comments, I gather that the file(s) I need are generated by a tool in the FreeBSD source, based on data from Unicode Inc (possibly also modified or augmented by other controlling files in the FreeBSD source.
I imagine it involves customising the standard human-readable definitions, then using the build tools to build a custom locale, which duplicates all existing files but includes changes to the collate definitions.
I haven't got beyond that so far, and would like clarity on the process by which FreeBSD's build system gets from whatever human-editable source files are involved, to the final collation definition data files used in a running system for locale charset ordering/comparison functions. Specifically, what steps I would have to do, to do this.
As a side benefit I expect to learn a lot by doing it - but above all I want my underscores where I'm so used to them...