[Haskell-cafe] [ANN] normalization-insensitive-2.0
Patrick Pelletier
code at funwithsoftware.org
Tue Aug 9 15:04:56 UTC 2016
normalization-insensitive is identical to case-insensitive, except it is
insensitive to Unicode normalization, rather than case. The module
Data.Unicode.NormalizationInsensitive provides the NI type constructor
which can be parameterized by a string-like type like: String,
ByteString, Text, etc.. Comparisons of values of the resulting type
will be insensitive to normalization.
https://hackage.haskell.org/package/normalization-insensitive
https://github.com/ppelleti/normalization-insensitive
I created this to solve a problem I was running into comparing filenames
on Mac OS X. Because Mac OS X converts all filenames to Normalization
Form D, the filenames I read back from disk were different than the
filenames I had written to disk. This package solved the problem very
neatly.
Under the hood, normalization-insensitive uses the unicode-transforms
package, which Harendra Kumar announced a few days ago on haskell-cafe.
This avoids having to pull in any heavyweight dependencies like ICU.
Thanks to Bas van Dijk for writing case-insensitive, upon which
normalization-insensitive is based. And thanks for Harendra Kumar for
reviewing normalization-insensitive and providing feedback, as well as
writing unicode-transforms.
Although this is the first release of normalization-insensitive, the
version number is 2.0 to avoid any confusion with the version numbers of
case-insensitive.
--Patrick
More information about the Haskell-Cafe
mailing list