Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mwotton/unidecode
https://github.com/mwotton/unidecode
Last synced: 12 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/mwotton/unidecode
- Owner: mwotton
- License: bsd-3-clause
- Created: 2017-01-10T02:17:18.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-10T20:10:30.000Z (over 7 years ago)
- Last Synced: 2024-04-26T01:30:50.427Z (7 months ago)
- Language: C
- Size: 40 KB
- Stars: 1
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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.htmlquick 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.