idna-0.3.0: Implements IDNA (RFC 3490).

Safe Haskell | None
Language | Haskell98

Text.IDNA

Description

This module implements the two algorithms from RFC 3490. (http://tools.ietf.org/html/rfc3490)

Synopsis

- acePrefix :: Text
- toASCII :: Bool -> Bool -> Text -> Maybe Text
- toUnicode :: Bool -> Bool -> Text -> Text

# Documentation

acePrefix :: Text #

The ASCII Compatible Encoding prefix (currently '`xn--`').

toASCII #

Arguments

:: Bool | Whether to allow unassigned code points (in RFC: AllowUnassigned).
-> Bool | Whether to disallow certain ASCII characters (in RFC: UseSTD3ASCIIRules).
-> Text | The text to transform.
-> Maybe Text |

Implements the ToASCII algorithm.

toUnicode #

Arguments

:: Bool | Whether to allow unassigned code points (in RFC: AllowUnassigned).
-> Bool | Whether to disallow certain ASCII characters (in RFC: UseSTD3ASCIIRules).
-> Text | The text to transform.
-> Text |