The unidecode package

[Tags:bsd3, library, test]

Please see README.md


[Skip to Readme]

Properties

Versions 0.1.0.0, 0.1.0.1, 0.1.0.2, 0.1.0.3, 0.1.0.4
Dependencies base (>=4.7 && <5) [details]
License BSD3
Copyright 2017 Mark Wotton
Author Mark Wotton
Maintainer mwotton@gmail.com
Category Text
Home page https://github.com/mwotton/unidecode#readme
Source repository head: git clone https://github.com/githubuser/unidecode
Uploaded Tue Jan 10 15:04:31 UTC 2017 by MarkWotton
Distributions NixOS:0.1.0.4
Downloads 151 total (34 in the last 30 days)
Votes
0 []
Status Docs available [build log]
Last success reported on 2017-01-10 [all 1 reports]
Hackage Matrix CI

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees

Readme for unidecode

Readme for unidecode-0.1.0.4

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 https://neilmitchell.blogspot.de/2015/09/detecting-space-leaks.html

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.