Flattens European non-ASCII characaters into ASCII

Latest on Hackage:

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow to host generated Haddocks.

MIT licensed by Daniel Choi
Maintained by


This simple library provides a function to flatten non-ASCII European characters into nearest US-ASCII equivalent.

Hackage package:

See source for Data.Char.AsciiFlatten for the character conversions.

The character translation table is derived from this URL:


:m + Data.Char.AsciiFlatten
ghci> map asciiFlatten "café"
ghci> map asciiFlatten "Übermensch"

When performance matters, use :: (Char -> Char) -> Text -> Text

Command line usage

The package also installs a simple command line tool named ascii-flatten for use from the command line and in shell scripts:

$ echo café | ascii-flatten

Code generation

The code for this package is generated using the script in the project directory.

Depends on 3 packages:
Used by 1 package:
comments powered byDisqus