@hackage unicode-data-names0.4.0

Unicode characters names and aliases

  • Installation

  • Tested Compilers

  • Dependencies (5)

  • Dependents (0)

  • Package Flags

      has-text
       (off by default)

      Expose an API using the text package

      has-bytestring
       (off by default)

      Expose an API using the bytestring package

      dev-has-icu
       (off by default)

      Use ICU for test and benchmark. Intended for development on the repository.

      export-all-chars
       (off by default)

      Build the export-all-chars executable

README

unicode-data-names provides Haskell APIs to efficiently access the Unicode character names and aliases from the Unicode character database.

There are 3 APIs:

  • String API: enabled by default.
  • ByteString API: enabled via the package flag has-bytestring.
  • Text API: enabled via the package flag has-text.

The Haskell data structures are generated programmatically from the Unicode character database (UCD) files. The latest Unicode version supported by this library is 15.1.0.

Please see the Haddock documentation for reference documentation.

Comparing with ICU

We can compare the implementation against ICU. This requires working with the source repository, as we need the internal package icu.

Warning: An ICU version with the exact same Unicode version is required.

cabal run -O2 --flag dev-has-icu unicode-data-names:tests -- -m ICU

Comparing with Python

In order to check Unicode implementation in Haskell, we compare the results obtained with Python.

Warning: A Python version with the exact same Unicode version is required.

cabal run -O2 -f "export-all-chars" -v0 export-all-chars > ./test/all_chars.csv
python3 ./test/check.py -v ./test/all_chars.csv

Licensing

unicode-data-names is an open source project available under a liberal Apache-2.0 license.

Contributing

As an open project we welcome contributions.