idna-0.2: Implements IDNA (RFC 3490).

Safe HaskellNone

Text.IDNA

Description

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

Synopsis

Documentation

acePrefix :: TextSource

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

toASCIISource

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.

toUnicodeSource

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