Must run on Linux, MacOS, and Windows (only recent versions would be fine, no legacy support is needed).
Must be implemented in one of the pre-commit supported languages, except "docker or "system".
Inputs: A locale like "en_NZ.UTF-8" and a filename.
Side effects: The file is sorted according to the given locale.
Basically I'm looking for a cross-platform equivalent of the POSIX/GNU sort
LC_COLLATE=en_NZ.UTF-8 sort -o FILE FILE. This is for my pre-commit hook, to support all the major platforms.