rfc5051

Simple unicode collation as per RFC5051.

LTS Haskell 23.1:0.2
Stackage Nightly 2024-12-23:0.2
Latest on Hackage:0.2

See all snapshots rfc5051 appears in

BSD-3-Clause licensed by John MacFarlane
Maintained by [email protected]
This version can be pinned in stack with:rfc5051-0.2@sha256:da5d77731f2ac6fe313a67919419b0833e09cd7f1a81869ed82a54dbf8962bf2,1678

Module documentation for 0.2

Depends on 3 packages(full list with versions):

This library implements i;unicode-casemap, the simple, non locale-sensitive unicode collation algorithm described in RFC 5051 (http://www.rfc-editor.org/rfc/rfc5051.txt). Proper unicode collation can be done using text-icu, but that is a big dependency that depends on a large C library, and rfc5051 might be better for some purposes.

Here is a list of strings sorted by the Prelude's sort function:

Abe Oeb abe abé oeb Ábe Äbe Ôeb ábe äbe ôeb.

Here is the same list sorted by sortBy compareUnicode:

Abe abe abé Ábe ábe Äbe äbe Oeb oeb Ôeb ôeb

Changes

0.2

  • Change API to use Text instead of String.
  • Add changelog.
  • Add test suite.
  • Move source to src directory.
  • Add Makefile.
  • Regenerate UnicodeData.hs module based on latest UnicodeData.txt.
  • Removed bytestring dependency.
  • Simplified dependencies on MkUnicodeData, removed unneeded Types module.
  • Remove MkUnicodeData flag and executable stanza. Easiest just to run this script with runghc.