Fix handling of IDNA flags and Punycode buffer sizing.

* IDNA flags were being encoded in reverse.
* PunyCode buffer sizing was checking the wrong status code.

Add a test suite to verify basic functionality.

Bump version to 0.2.2.
4 files changed
tree: c43b9a9086dcb5054314d548010ac3427dbc0391
  1. Setup.hs
  2. gnuidn.cabal
  3. lib/
  4. license.txt
  5. tests/