The unidecode package

[ Tags: bsd3, library, text ] [ Propose Tags ]

Please see

[Skip to Readme]


Dependencies base (>=4.7 && <5) [details]
License BSD3
Copyright 2017 Mark Wotton
Author Mark Wotton
Category Text
Home page
Source repo head: git clone
Uploaded Tue Jan 10 15:04:31 UTC 2017 by MarkWotton
Distributions NixOS:
Downloads 779 total (35 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2017-01-10 [all 1 reports]
Hackage Matrix CI




Maintainer's Corner

For package maintainers and hackage trustees

Readme for unidecode-

[back to package description]

Unidecode: a transliterator of last resort

So, for some reason you're stuck in the 90s and can't use UTF text. Punycode isn't cutting it? Fine: Unidecode will help you murder some carefully constructed text into something vaguely readable in good ol' "I don't wanna learn anything"-ASCII.

There's one function, unidecode :: Char -> String. If you have more text, I'm sure you can foldMap & pack it.

(This is sourced ultimately from Unicode.PM, but I scavenged the tables from Carter Schonwald, who graciously allowed usage.)

Why did you write a bunch of C, Mark? Don't you like Haskell?

GHC compiled a big Haskell literal list fine, then crashed at runtime with some weaksauce excuse about "i can't handle something that big, the compiler should have rejected it". Cons cells are for closers, RTS.

The other approach that Carter took was to build an IntMap on top of the C data structures, but for reasons I still can't quite comprehend, it didn't pass the stack-leak detection trick at

quick bsearch did the job (and I learned in the process that a Haskell project is not a bad way to build C code).

issues/PRs all welcome, but hopefully there's not anything missing.