Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jgm/rfc5051
Haskell implementation of RFC5051, simple unicode collation.
https://github.com/jgm/rfc5051
Last synced: 26 days ago
JSON representation
Haskell implementation of RFC5051, simple unicode collation.
- Host: GitHub
- URL: https://github.com/jgm/rfc5051
- Owner: jgm
- License: bsd-3-clause
- Created: 2013-04-28T16:20:49.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2020-08-01T20:13:11.000Z (over 4 years ago)
- Last Synced: 2024-05-09T14:05:51.695Z (6 months ago)
- Language: Haskell
- Size: 318 KB
- Stars: 5
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: changelog.md
- License: LICENSE
Awesome Lists containing this project
README
rfc5051 - Simple unicode collation
----------------------------------This library implements 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](http://hackage.org/package/text-icu), but that is a big
dependency that depends on a large C library. rfc5051 might be better
for some purposes.Here is a list of lines sorted by the Prelude's `sort` function:
Abe
Oeb
abe
abé
oeb
Ábe
Äbe
Ôeb
ábe
äbe
ôebHere is the same list sorted by `sortBy compareUnicode`:
Abe
abe
abé
Ábe
ábe
Äbe
äbe
Oeb
oeb
Ôeb
ôebThe library's data module, `Data.RFC5051.UnicodeData`, is generated
from the data file `UnicodeData.txt`. To regenerate it, use the
Makefile or:runghc MkUnicodeData.hs > src/Data/RFC5051/UnicodeData.hs